Random images

apps

#1

I found many php scripts that allow me to display random images. BUT they work inside a htm(l) file… I need one that will work inside a php file !!!

suggestions ???

Thanks


http://theMezz.com


#2

[quote]I found many php scripts that allow me to display random images. BUT they work inside a htm(l) file… I need one that will work inside a php file !!!

suggestions ???[/quote]
Hire a PHP developer to write something like this for you?

[code]function randomimage() {
// A list of random image filenames.
$randomimage_filenames = array(
‘image1.jpg’,
‘image2.gif’,
‘image3.jpg’,
‘image4.gif’,
‘image5.png’
);
// Count how many filenames there are.
$randomimage_count = count($randomimage_filenames);
// Pick one at random.
$randomimage_number = mt_rand(0, $randomimage_count - 1);
$randomimage_filename = $randomimage_filenames[$randomimage_number];
// Return the filename as our result.
return $randomimage_filename;
}

echo ‘random image’;[/code]

:cool: openvein.org -//-