|
|
| |
|
|
| |
|
Dynamic Avatar / Random
02.15.02, 06:55:16
|
|
|
|
Post #1 (permalink) |
|
|
| |
|
|
Ever wanted a random avatar? Well now you can! Just follow theese easy steps:
Make a text file (notepad) and put this in it:
Quote:
|
AddType application/x-httpd-php .jpg
|
Save is as .htaccess
Now make another text file and put this into it:
PHP Code:
<?php
Header("Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0");
Header("Expires: Thu, 19 Nov 1981 08:52:00 GMT");
Header("Pragma: no-cache");
srand((double)microtime()*1000000);
$nr=rand(1,2);
header("Location: pic$nr.gif");
echo "blah";
?>
Save is as image.jpg yes thats right PHP in a image file.
In the line
You can set the number of pics you have (change the "2" with the number you have)
Now take the pictures you want to use as a avatar (they must be .gif files and save them as pic1.gif, pic2.gif....
Now with your FTP make a new folder on your server and call it whatever you want and upload all the files into it (make sure you dont have anything else in that folder. Now just use the image "image.jpg" as a avatar. Thats all now you get yourself a dynamic avatar! NB! Your server/host must support PHP
Have any problems just ask me. (i'm not using one because I like the one I have now) PHP rules  |
______________________________________
|
|
|
|