PHP and action script - Random Search

I posted an earlier question regarding the in the Flash MX forum with some joy, but now my question is purely AS. I’m very new to AS, and even newer to PHP

Firstly I aim to load random jpgs into a movieclip from a folder online. online image dir As jpgs will be constantly added to this by anyone, I will never know the file.jpg names to put into my AS.

So i was advised I needed PHP to do this, (I know little about PHP) I got some space where PHP works! PHP enabled

Right so at the moment I have a Movie Clip in flash with a piece of AS that says
[AS]onClipEvent (load) {
loadVariables(“http://www.cppa.co.uk/t/test1.php”, this, “GET”);
filenames.split(":");
myRandom = random(filenames.length);
key1.loadMovie(filenames[myRandom]);
}
[/AS]

this should start looking at my piece of PHP and then retreive the required filenames

obviously the web address above links to this bit of PHP address

This is the php script it use to get the file names inside the “images” folder

<?PHP
$dir = "c:\websites\free\crystal\www	\images\";
$handle = opendir($dir);
while (false !== ($file = readdir($handle))) {
    if ($file != "." && $file != "..") {
        $filenames .= $file.":";
   }
}
closedir($handle);
echo "&filenames=".$filenames;
?> 

But when trying my php file through firefox its says (php file

“Parse error: parse error, unexpected ‘.’ in c:\websites\free\crystal\www est1.php on line 5”

So if anyone could give me any advice on how to make this piece of PHP script send the flash the filenames of the directory, so flash can random insert on into a movie clip, it would be great!

Also is my bit of AS correct?

if you need my fla, just say.

Thanks in advance