everytime i use my current avatar on a forum, i get tons of pms "how do you do that" etc. etc..
so im going to beat the punch this time becuase its hella annoying..
For those of you who would like to do the same with some different images heres how...
first create a .htaccess file
insert this..
paste this in
then put both those in the same directory as all the images you want, upload them to your website and link your avatar to
www.yoursite.com/avatar/avatar.jpg
just an example you might make the directory whatever but basically link back to avatar.jpg when its on the web..
make the the .htaccess file has no exstensions (.txt, .rtf, etc. etc.)
so im going to beat the punch this time becuase its hella annoying..
For those of you who would like to do the same with some different images heres how...
first create a .htaccess file
insert this..
then open wordpad or notepadAddType application/x-httpd-php .jpg
paste this in
save that as avatar.jpg<?php
$dh = opendir(".");
while (false !== ($file = readdir($dh)))
{
if (preg_match('/.jpg$/i', $file) and $file != "avatar.jpg") // sanning for .jpg files only and stopping avatar.jpg being loaded (you will run into errors if this isnt here)
{
$filelist[] = $file;
}
}
srand((double)microtime()*1000000);
$picnum = rand(0, sizeof($filelist) - 1);
header("Location: " . $filelist[$picnum]);
closedir($dh);
?>
then put both those in the same directory as all the images you want, upload them to your website and link your avatar to
www.yoursite.com/avatar/avatar.jpg
just an example you might make the directory whatever but basically link back to avatar.jpg when its on the web..
make the the .htaccess file has no exstensions (.txt, .rtf, etc. etc.)