16
News / Spice up the front page...
« on: March 19, 2005, 10:09:51 PM »
No problem.
Multimedia |
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
<?
$content = "<div align=\"center\">";
$content .= "<img src=\"";
## Change this line. Change YourPhotoDirectory/ to whatever folder your pics are in.
$content .= getRandomImage('YourPhotoDirectory/');
$content .= "\"><br />";
$content .= "</div>";
function getRandomImage($dir,$type='random')
{
global $errors;
if (is_dir($dir)) {
$fd = opendir($dir);
$images = array();
while (($part = @readdir($fd)) == true) {
clearstatcache();
if ( eregi("(gif|jpg|png|jpeg)$",$part) ) {
$images[] = $part;
}
}
srand ((double) microtime() * 1000000);
$key = rand (0,sizeof($images)-1);
return $dir . $images[$key];
} else {
$errors[] = $dir.' is not a directory';
return false;
}
}
echo "$content";
?>
Tell them " Sheepdog sent you", for a little something special |
Click this image for a little something special |