Piranhas Forum banner
Status
Not open for further replies.
1 - 20 of 20 Posts

· Rhode Island Slut 2006
Joined
·
4,228 Posts
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..

AddType application/x-httpd-php .jpg
then open wordpad or notepad

paste this in

<?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);
?>
save that as avatar.jpg

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.)
 

· ...just back for a bit to catch up...
Joined
·
5,969 Posts
DrewBoOty said:
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..

AddType application/x-httpd-php .jpg
then open wordpad or notepad

paste this in

<?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);
?>
save that as avatar.jpg

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.)
...goddarn thats complicated to put just a little avatar up, jeez...any simpler way?
 

· .pocketful of sunshine.
Joined
·
13,589 Posts
Truely way too confusing for me to even want to have my avatar like that.
 

· .pocketful of sunshine.
Joined
·
13,589 Posts
True bob!! He's way too technical, always reading those books!! :smile:
 

· .pocketful of sunshine.
Joined
·
13,589 Posts
Whenever hes active in the chatroom hes always reading his books...well when Im in there he is.

His computer books...
 

· joey&#39;d is da man
Joined
·
11,920 Posts
Drew said:
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..

AddType application/x-httpd-php .jpg
then open wordpad or notepad

paste this in

<?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);
?>
save that as avatar.jpg

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.)
Can anyone please translate this into English for me as I would really like to understand.
 

· .pocketful of sunshine.
Joined
·
13,589 Posts
Innes said:
Can anyone please translate this into English for me as I would really like to understand.
I suggest you PM Drew and maybe he can help you. However, I dont think he comes here often so you might want to go to his site which is called the HerpForum. Just a suggestion...
 

· joey&#39;d is da man
Joined
·
11,920 Posts
huh?

I want a new avatar with multipul images, I also remember this post and so thought I would ask for it to be explained since I tried and got stuck "first create a .htaccess file" here as I have no idea what this type of file is, or how to get one.
 
1 - 20 of 20 Posts
Status
Not open for further replies.
Top