Do you mean a random image, or a random image and link?
For a random image, you can try this simple php script
PHP Code:
|
<?php
$path = "nade/";
function GetDir($sPath, &$avatars)
{
$handle=opendir($sPath);
while ($file = readdir($handle))
{
if ($file != "." && $file != "..")
{
$avatars[count($avatars)] = $file;
}
}
closedir($handle);
}
$avatars = array();
GetDir($path, &$avatars);
$i = 0;
while($avatars[$i] != "")
{
$i++;
}
$i = rand(0, $i-1);
include("".$path."".$avatars[$i]."");
?>
|
replace nade/ in $path, with the folder your images are in. then just call the php script.