oh yeah. here's the source, for those of you who want it
--------------------------------------------------
Code:
<?php
header("content-type: image/jpg"); //netsmog forum dosent like that first ", the & quot is a "
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
//RandomIMG
//]MX[Uranium-235
function loadimage($filename)
{
$file = fopen($filename, "rb");
fpassthru($file);
fclose($file);
}
$mdir = "images/$catagorey";
if(trim($catagorey) == "")
loadimage("images/error.jpg");
if(!$dir = @opendir($mdir))
loadimage("images/error.jpg");
while($file = readdir($dir))
{
if($file != ".." && $file != ".")
$imgs[] = $file;
}
closedir($dir);
mt_srand(time());
$num_img = count($imgs)-1;
//patched - mt_rand will not accept (0, 0)
if($num_img <= 0)
$rand = 0;
else
$rand = mt_rand(0, $num_img);
$images = $mdir . "/" . $imgs[$rand];
loadimage($images);
?>