$folder = ’images’;usage
$i = 0;
$imgDir = opendir ($folder);
while ( $file = readdir( $imgDir ) )
{
//checks that file is an image
$file_type = strrchr( $file, "." );
$is_image = eregi( "jpg|gif|png",$file_type );
if ( $file != ’.’ && $file != ’..’ && $is_image )
{ $images[$i++] = $file; }
}
closedir ($imgDir);
srand( (double) microtime()*1000000 );
$image_name = $folder. ’/’ . $images[rand( 0,sizeof( $images ) -1 )];
$imgSize = GetImageSize( $image_name );
//ends script if no images found
if ( $i == 0 )
die();
return"background=’$image_name’$imgSize[3]";
$file_type = strrchr( $file, "." );
$parts = pathinfo($filename); $extension = strtolower($parts['extension']);
Returns part of haystack string from the first occurrence of needle to the end of haystack.
$filename = "test.this.txt"; echo strchr( $filename, "." ); echo "<br />"; echo strstr($filename, ".");
$extension = substr(strrchr($filename, "."), 1);
$folder = 'images';
usage put the call to the snippet in the table, div or background into the <> (whithout puting the sice it take from image sice example <tdvalign="top" [[RandomImage]] bgcolor="#F4F4F4">content</td> put [! !] if you want to update on browser reload (dont tested i dont want it) change the folder to the direction of your image folder
[based on etomite random image snippet]

i think you need rename images to the folder images are
hi
I tried doing that and had trouble, although I have figgured out what the correct path should be. Wasn’t sure on leading and trailing /’s etc, or what the starting path was, eg assests, root etc