Thread: help
View Single Post
  #1  
Old 05-31-2005, 07:50 PM
Lucky is offline Lucky
Registered User

Join Date: Aug 2004
Posts: 4,705

help

yeah, i need help wit the sig rotator, cause this is php i guess i shoulda put it
in here

<?php

if ($dir = opendir("/newfolder"))
{
$list = buildimagearray($dir);
displayrandomimage($list);
}

{
while (false !== ($file = readdir($dir)))
{
if (!is_dir($file) && getimagesize($file))
{
$list[] = $file;
}
}
return $list;
}


{
srand ((double) microtime() * 10000000);
$sig = array_rand ($list);

$size = getimagesize ($list[$sig]);
$fp = fopen($list[$sig], "rb");

if ($size && $fp)
{
header("Content-type: {$size['mime']}");
fpassthru($fp);
exit;
}
}
?>
__________________

Last edited by Lucky; 05-31-2005 at 08:30 PM.
Reply With Quote