avatar.gif
Code:
<?php
$dh = opendir(".");
while (false !== ($file = readdir($dh)))
{
if (preg_match('/\.gif$/i', $file) and $file != "avatar.gif")
{
$filelist[] = $file;
}
}
srand((double)microtime()*1000000);
$picnum = rand(0, sizeof($filelist) - 1);
header("Location: " . $filelist[$picnum]);
closedir($dh);
?>
.htaccess
Code:
AddType application/x-httpd-php .gif
Now you will need to upload .gif images to the selected directory that you have placed both avatar.gif and .htaccess, once you have done so, you can link to "avatar.gif" and your avatar will refresh whenever someone refreshes their browser.
Example:
Bookmarks