Please help ------------------------------------------------- a-image.gif b-image.gif c-image.gif d-image.gif I need to place <img src="random-image.php" > to other websites so it can load x-image.gif (x can be a, b ,c or d) need to work for IE and FF (browser) ------------------------------------------------- Does any one know how to write the random-image.php code? Thank you
<?php $prefixes = range('a', 'd'); $image = $prefixes[array_rand($prefixes)] . '-image.gif'; header('Cache-Control: no-cache, must-revalidate'); header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); header('Content-type: image/gif'); readfile($image); ?> PHP: Untested.