Folder Listing needs incorporated

Hello all,
Okay, I’m new to the action script, but not new to programming. I have looked around for a file listing function in this language, but haven’t came up with anything. So, I decided to write a .php file to print out all the files in a certain folder. Now, I need to have my script access that some how. Here is what I need to do basically, I am creating a photo gallery, which I have done successfully, with a little help from Kirupa. The problem is, I want to be able to upload images, and the photo gallery be able to show them, without having to add them into the photo array in the .swf. I have an array that holds the filenames that I want to show, but I want the to update dynamically to whatever is in my images folder. Any ideas or help on this topic would be greatly appreciated.

Thanks,
Darin