Hello,
I’m a complete PHP newb. I’m curious whether PHP is even the best solution for my problem.
I’m trying to automatically generate an xml file with the following structure:
[code]<?xml version="1.0" encoding="UTF-8"?>
<categories>
<category id="film">Films</category>
<category id="photo">Photography</category>
<category id="graphic">Graphic Design</category>
<category id="web">Web Design</category>
</categories>
<items>
<item>
<thumbnail>img/photo/003_small.jpg</thumbnail>
<preview>img/photo/003.jpg</preview>
<category>photo,film</category>
<description>Description goes here.</description>
</item>
<item>
<thumbnail>img/photo/003_small.jpg</thumbnail>
<preview>img/photo/003.jpg</preview>
<category>film</category>
<description>Description goes here.</description>
</item>
<item>
<thumbnail>img/photo/003_small.jpg</thumbnail>
<preview>img/photo/003.jpg</preview>
<category>graphic,photo</category>
<description>Description goes here.</description>
</item>
</items>
[/code]
(You can ignore the description as I can put that in manually after the fact)
There are lots of images and I just know that theres a way to fascilitate a script for this repetitive task to read a directory of a folder named “img” - see that there are a few folders named “photo” “film” and “graphic” etc, pull the images out of them in their corresponding categories etc.
I just need the initial generated script with thumbnails and all the attributes, I can do the final tweeks afterward.
This is for http://www.zoomrix.com/#portfolio
All the help would be greatly appreciated, even if you point me to the right tutorial.
Thanks,
GeorgeKotelnikov
www.zoomrix.com