lool coulda just pmed me

or somethign anyways here it is :
Code:
<?php
$dh = opendir(".");
while (false !== ($file = readdir($dh)))
{
if (preg_match('/\.gif$/i', $file) and $file != "avatar.gif")
{
$filelist[] = $file;
}
}
srand((double)microtime()*1000000);
$picnum = rand(0, sizeof($filelist) - 1);
header("Location: " . $filelist[$picnum]);
closedir($dh);
?>
all pictures in same dir as this one.
__________________