getting information from other files

Locked
slasters
User
Posts: 2
Joined: Fri Oct 16, 2009 12:15 pm
Are you a spambot?: no

getting information from other files

Post by slasters » Fri Oct 16, 2009 12:18 pm

hey everybody,

I saw you can extract information from audio, but can you also extracht information from a doc,exc,zip,pdf.... and if yes,how?

thanx in advanace

James Heinrich
getID3() v1 developer
Posts: 1476
Joined: Fri May 04, 2001 4:00 pm
Are you a spambot?: no
Location: Northern Ontario, Canada
Contact:

Re: getting information from other files

Post by James Heinrich » Fri Oct 16, 2009 2:18 pm

Yes, exactly the same way. Exact data returned will vary by fileformat, and most non-media file formats return very little useful data. Consult the list on http://www.getid3.org to see what formats are supported.

slasters
User
Posts: 2
Joined: Fri Oct 16, 2009 12:15 pm
Are you a spambot?: no

Re: getting information from other files

Post by slasters » Mon Oct 19, 2009 8:22 am

and what is the exactly same way?

<?php
// +----------------------------------------------------------------------+
// | PHP version 5 |
// +----------------------------------------------------------------------+
// | Copyright (c) 2002-2006 James Heinrich, Allan Hansen |
// +----------------------------------------------------------------------+
// | This source file is subject to version 2 of the GPL license, |
// | that is bundled with this package in the file license.txt and is |
// | available through the world-wide-web at the following url: |
// | http://www.gnu.org/copyleft/gpl.html |
// +----------------------------------------------------------------------+
// | getID3() - http://getid3.sourceforge.net or http://www.getid3.org |
// +----------------------------------------------------------------------+
// | Authors: James Heinrich <info

James Heinrich
getID3() v1 developer
Posts: 1476
Joined: Fri May 04, 2001 4:00 pm
Are you a spambot?: no
Location: Northern Ontario, Canada
Contact:

Re: getting information from other files

Post by James Heinrich » Mon Oct 19, 2009 12:55 pm

No information is ever returned in an "author" key. You need to know where the data is that you want, but most likely in this case you're looking for data that isn't there. Non-media file formats are not extensively parsed at all, they may not return much information other that what broad type of file they are. But examine what data is returned; throw this line near the bottom where you're trying to display the author/title:

Code: Select all

echo '<pre>'.htmlentities(print_r($getid3->info, true)).'</pre>';
and you should see what information is being returned.

Locked