Link to home
Start Free TrialLog in
Avatar of eflanigan
eflanigan

asked on

Read JPEG File Summary Fields with PHP

In PHP4, I would like to display the "Summary" tab of a file's properties.  For example, in Windows if you right click a JPEG and go to properties, the last tab is labeled "Summary".  It displays Title, Subject, Author, Category, Keywords, and Comments.  Can I somehow read these fields via PHP into variables?  I am trying to place those fields in an online photo album.  I have found a script that reads the EXIF data but the fields above are not included in the output.  Any help would be appreciated!  Thanks!

I am using PHP Version 4.3.11.
Avatar of Member_2_3684445
Member_2_3684445
Flag of Netherlands image

Well actually you cant. Simply by using php. This functionality is not even "default"  available for languages like vbs / wmi etc. There is actually an object in windows that will allow you to access this "Metadata" in windows, its called the windows DSOfile object that needs to be registered in windows. There are allot of items on the subject, just look for "DSOfile + PHP".

The next question you should ask yourself is "where" is this information stored. We know that allot of "metadata" on files is stored in the NTFS filesystem. Stuff like security objects and others. Copying files from one network system to the other will show you that this information is determined by that machine on wich the file resides. This means that allot of this security information is not "preserved" while being moved or copied even over different physical disks within the same system.  In not sure the summary is actually stored in the filesystem like all this other metadata or coded inside the physical file.

Anywayz you might want to experiment with it using the DSOfile.dll module.

Good luck! :D
ASKER CERTIFIED SOLUTION
Avatar of Steve Bink
Steve Bink
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of eflanigan
eflanigan

ASKER

Thank you both for your quick response!  The reason I asked how to do it in PHP4 is that my host is GoDaddy and I *thought* they only allowed PHP4.  Fortunately I just found out that if you change the extension of your PHP file to ".php5" you can use PHP5.  Therefore I am just going to use the handy "exif_read_data();".  For those of you checking out this question you can find more information about the exif function here: http://us2.php.net/manual/pl/function.exif-read-data.php