Xml / PHP

hi everyone,

i have a flash photo slideshow for my website that loads an image list from an external xml file whihc is fine, but is thaere anyway to automatically update the xml file with all the files in a specific folder, or is there a way so that i can put an upload form on a php file and when the user uploads the picture, it will automatically be writen in the xml file,

this is the current xml file i am using with the current pictures added manually.

<?xml version="1.0" encoding="UTF-8"?> <gallery> <album title="Random Pictures" description="Just RandomPictures From My Computer" lgPath="galleryalbum1large" audio="galleryalbum1mp3/musicloop.mp3"> <img src="83346fc6b75ea693.jpg" /> <img src="FamilyGuyFamilyPromo.png" /> <img src="DSC00204.JPG" /> <img src="DSC00205.JPG" /> <img src="181.jpg" /> </album> </gallery>

any help would be fantstic :)

Chris

i woudn’t update the xml file but generate it with php:

[code]<?php header('Content-Type: aplication/xml'); ?>

<?xml version="1.0" encoding="UTF-8"?> <?php if ($handle = opendir('galleryalbum1large')) { while (false !== ($file = readdir($handle))) { if ($file[0] != ".") { echo ''; } } closedir($handle); } ?> [/code]

http://php.net/readdir

Sponsor our Newsletter | Privacy Policy | Terms of Service