Final Fantasy Republic Forums  
 Home | Forums | Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
     
    
        
     
 
Final Fantasy Republic Forums  
Username:

Password:
CAPTCHA:
  
        
Closed Thread
 
LinkBack Thread Tools Display Modes
  kula shakerz
 
 
kula shakerz's Avatar
Stoned Love
 
Posts: 132
 
Reg: Feb 04 2002
 
ID: 56
 
RP: 0
 
Final Fantasy VII
1234 - The Jeevas
LoTR
LoTR
PlayStation 2
     
 
Default  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
PHP Code:
$nr=rand(1,2); 
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
______________________________________

  kula shakerz is offline
View kula shakerzs Profile! Find more posts by kula shakerz! Visit kula shakerzs Homepage!  
  aerosol
 
 
aerosol's Avatar
Registered Member
 
Posts: 5,529
 
Reg: Aug 25 2001
 
ID: 9
 
RP: 0
     
 
Default  02.15.02, 16:58:15
  Post #2 (permalink)
 
     

That's pretty cool.
______________________________________

A E R O S O L
I AM BLACK, JEWISH, AND COMPLETELY WORTHLESS, I PROMISE
  aerosol is offline
View aerosols Profile! Find more posts by aerosol! Visit aerosols Homepage!  
  
 
Posts: n/a
 
ID:
 
RP:
     
 
Default  02.15.02, 17:08:55
  Post #3 (permalink)
 
     

Sounds interesting. I'll try it out tonight (if I can connect on my FTP, that is!)
 
 
  aerosol
 
 
aerosol's Avatar
Registered Member
 
Posts: 5,529
 
Reg: Aug 25 2001
 
ID: 9
 
RP: 0
     
 
Default  02.15.02, 17:10:08
  Post #4 (permalink)
 
     

I wish I had the brain capacity to understand what the hell it was, though.

  aerosol is offline
View aerosols Profile! Find more posts by aerosol! Visit aerosols Homepage!  
  Tweakin D
 
Posts: n/a
 
ID:
 
RP:
     
 
Default  02.15.02, 17:11:34
  Post #5 (permalink)
 
     

hahaha u don't know wht it is? its pretty much the same thing pixel core uses on their splash page
 
 
  aerosol
 
 
aerosol's Avatar
Registered Member
 
Posts: 5,529
 
Reg: Aug 25 2001
 
ID: 9
 
RP: 0
     
 
Default  02.15.02, 17:12:18
  Post #6 (permalink)
 
     

I know what it is, I just don't understand the damn coding.
  aerosol is offline
View aerosols Profile! Find more posts by aerosol! Visit aerosols Homepage!  
  
 
Posts: n/a
 
ID:
 
RP:
     
 
Default  02.15.02, 17:15:29
  Post #7 (permalink)
 
     

I see what its doing.

One thing I don't get is the "srand" command. I don't see it being used anywhere else in the code. Another thing baffling me is the "Location" and "blah" part of the code. What's that supposed to be replaced with?
 
 
  aerosol
 
 
aerosol's Avatar
Registered Member
 
Posts: 5,529
 
Reg: Aug 25 2001
 
ID: 9
 
RP: 0
     
 
Default  02.15.02, 17:18:57
  Post #8 (permalink)
 
     

It's interesting how you can put php into image form. I wonder if php can do any other cool things like do your homework.

  aerosol is offline
View aerosols Profile! Find more posts by aerosol! Visit aerosols Homepage!  
Closed Thread



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Avatar Kerrigor Midgar Library 2 05.18.03 20:29:51
[RS]Aira's Avatar Fleamarket The Weapon Graphical Cafe 2 02.02.03 09:35:06
Mission Pub now open. Avatar creation services Mission_ Graphical Cafe 0 01.17.03 16:33:55
Celebrity Death Match Contest [RP PRIZE] Mederu Event Archives 225 10.16.02 04:13:32
Eraphs Avatar Shop! Eraph Graphical Asylum 8 05.06.02 08:47:44