Skip to main content
December 1, 2008
Question

Creating a xml photo gallery

  • December 1, 2008
  • 2 replies
  • 619 views
I am wondering if there is a way to use data stored as part of the image (tag data?) like the title of the image and accompanying comments to display in the <caption></caption> section of the xml file.

right now I have php write the xml file in the following format
<gallery>
<image>
<url></url>
<caption></caption>
<width></width>
<height></height>
</image>
</gallery>

The php just pulls all the images from a folder so the gallery gets updated when I add images to the folder. Now I would like to know if that info from the file (the stuff you see when you right click the file to see its properties, then the summary) can be generated under the caption section. This way the captions can be automatically generated without me having to type it in for each image.

I am using this for our school website. It is for our staff page. I am hoping to just drop the images of the staff in a folder and have the page update that way and include the staff member name and their teaching assignment as part of the "title" and "comments" section of the tag data of the image.

Thanks

Darren
This topic has been closed for replies.

2 replies

December 3, 2008
I will give it a try. Thanks
Inspiring
December 2, 2008
Hi Darren,

Last week I was troubleshooting a photo gallery, and discover a PHP class does this. This program will extract EXIF information from the image file. It is called Exifer.
The URL for more info is at:
http://www.jakeo.com/software/exif/index.php

Good luck
David
December 3, 2008
I am using the following php code to generate the xml

I want to complete the code to include the EXIF data of the image between the <caption></caption> tags in the code. The EXIF data I want to use is the title and summary.

Any help is appreciated.