( search forums )
Where can i get that avatar-y thing like enesce?
Soldat Forums - Misc - The Lounge
nfsjunkie91
December 12, 2005, 9:28 pm
Is there a website that i can goto to download that avatar.php? i have a webserver with .php support, and i was wondering if someone could give me information about this. i know enesce had it set up like that b4 mr. Santa-butt. :P

Dark_Noddy
December 12, 2005, 11:00 pm
Now I'm not a php wiz or anything but snt it just a script returning a random (or orderd) URL to a pic ?

Vijchtidoodah
December 12, 2005, 11:52 pm
That's why I stopped using my random avatar script -- I knew the instant someone else did the same thing, it would just be another annoying gimmick.

Nfs, you can use my old one:

[code]<?php

$avatars[0] = "Avatar.jpg"; \\self-explanatory, really, just put the filename here (caps-specific)
$avatars[1] = "Blast.jpg";
$avatars[2] = "Blind.jpg";
$avatars[3] = "brazil.jpg";
$avatars[4] = "Charles%20de%20gaulle.jpg";
$avatars[5] = "Chunk.gif";
$avatars[6] = "Headinbutt.jpg";
$avatars[7] = "Passage.jpg";
$avatars[8] = "Penguin.gif";
$avatars[9] = "Oilwar.jpg";
$avatars[10] = "Pilot.gif";
$avatars[11] = "Superman.jpg";
$avatars[12] = "Tracks.jpg";
$avatars[13] = "Shoes.jpg";
$avatars[14] = "Buddhist.jpg";
$avatars[15] = "Tunnel.jpg";
$avatars[16] = "Blast2.jpg";
$avatars[17] = "EmptyBench.jpg";
$avatars[18] = "Flower.jpg";
$avatars[19] = "Metal.jpg";
$avatars[20] = "Tree.jpg";
$avatars[21] = "Orange.jpg";
$avatars[22] = "Tiananmen.jpg";
$avatars[23] = "Scratch.jpg";
$avatars[24] = "Xray.jpg";
$avatars[25] = "Metropolis.jpg";
$avatars[26] = "Linoleum.jpg";
$avatars[27] = "Maxx.jpg";
$avatars[28] = "GardenOfSelves.jpg";
$avatars[29] = "Face.gif";
$avatars[30] = "Force%20Majuere.gif";
$avatars[31] = "Facemeat.jpg";


$url = 'http://vd.llsc.us/Pictures/'; \\url of the folder where your avatar pictures are
$avatar_number = rand(0,31); \\modify that 31 to be the highest number in your list above
$rand_avatar = "$avatars[$avatar_number]";
header("Location: $url" . "$rand_avatar");
?>[/code]

peemonkey
December 13, 2005, 1:41 am
mmmm.....PHP.....

b00stA
December 13, 2005, 6:52 pm
Just modified Vij' version a little bit. It's now more dynamic, so you can easily add/remove images now.
Haven't tested it though!
[code]<?php
srand((double) microtime() * 1000000);
$avatars[] = "Avatar.jpg"; //self-explanatory, really, just put the filename here (caps-specific)
$avatars[] = "narf.jpg"; // just repeat this as often as you want

$url = 'http://vd.llsc.us/Pictures/'; //url of the folder where your avatar pictures are
$rand_avatar = $avatars[rand(0,count($avatars)-1)]
header("Location: $url" . "$rand_avatar");
?>[/code]

nfsjunkie91
December 14, 2005, 5:44 pm
thanks all :D now i gotta set this up.

DePhille
December 14, 2005, 6:12 pm
Does it allow to run the same script for Signatures?
I want to create some dynamic sig that shows the currentl Number of SoldatPage maps for example.
so:
1)Is it possible to have a .php file as Signature image?
2)Is it possible to have a .php file as image in a post?
3)Is it possible to give that .php image in the Singature GET parameters (image.php?id=1)
4)Is it possible to give that .php image in the post GET parameters (image.php?id=1)

nfsjunkie: If you know some GD library functions you can also add some dynamic u^dating values like the IP address of the user viewing your image to that image.

Grtz , DePhille

b00stA
December 14, 2005, 6:41 pm
DePhille, using a .PHP file as a signature/avatar/etc. is fine as long as it actually returns the image (using the header function).
Just remember that images have to be <=20kb and <=90x90 or for signatures 300x125

mar77a
December 14, 2005, 7:05 pm
I believe t's even more dynamic this way:
[code]
<?php
srand((double) microtime() * 1000000);
$url = 'http://vd.llsc.us/Pictures'; //url of the folder where your avatar pictures are
$avatars = glob("$url/*.*");
$rand_avatar = $avatars[rand(0,count($avatars)-1)]
header("Location: $url" . "$rand_avatar");
?>[/code]

b00stA
December 14, 2005, 7:12 pm
Neat, thanks. I didn't know about the glob() function. Would have probably used open/readdir for this..

mar77a
December 14, 2005, 9:06 pm
Yeah, but opendir() & readir() dont work with safe-mode, while glob() does.

vash763
December 15, 2005, 12:53 am
I wish I knew some php

And mar77a had the random weapon in his sig

Soulsnipa
December 15, 2005, 1:04 am
Upload your pictures here: http://sml.u13.net/?p=files


Open notepad, copy and paste this into notepad:

[code]<?php
srand((double) microtime() * 1000000);
$avatars[1] = "yourfile1.gif"; //self-explanatory, really, just put the filename here (caps-specific)
$avatars[2] = "yourfile2.JPG"; // just repeat this as often as you want


$url = 'http://sml.u13.net/files/'; //url of the folder where your avatar pictures are
$avatar_number = rand(1,2); //modify that 2 to be the highest number in your list above
$rand_avatar = "$avatars[$avatar_number]";
header("Location: $url" . "$rand_avatar");
?>[/code]

Save As...

"[yournamehere]avatar.php" with the quotation marks.

Upload php file here: http://sml.u13.net/?p=files

Your Link: http://sml.u13.net/files/[yournamehere]avatar.php



Another alternate example for hotlinking.

<?php
srand((double) microtime() * 1000000);
$avatars[1] = "http://-----------.com/files/image/23432432"; //self-explanatory, really, just put the filename here (caps-specific)
$avatars[2] = "http://-----------.com/files/image/242432"; // just repeat this as often as you want
$avatars[3] = "http://-----------.com/files/image/23432342432";

$avatar_number = rand(1,3); //modify that 3 to be the highest number in your list above
$rand_avatar = "$avatars[$avatar_number]";
header("Location: $rand_avatar");
?>



Rambo_6
December 15, 2005, 1:52 pm
NOW YOU TOO CAN BE THE TOAST OF THE NEIGHBORHOOD WITH YOUR BRAND NEW RANDOM AVATAR SCRIPT AND CRAP

mar77a
December 15, 2005, 3:29 pm
...said the guy with the random image logo in his site...

Yukwunhang
December 15, 2005, 6:25 pm
...So you allow us to upload php files to your site?
...Expect a downtime soon.

Deleted User
December 15, 2005, 11:59 pm
quote:Originally posted by SoulsnipaUpload your pictures here: http://sml.u13.net/?p=files


Open notepad, copy and paste this into notepad:

[code]<?php
srand((double) microtime() * 1000000);
$avatars[1] = "yourfile1.gif"; //self-explanatory, really, just put the filename here (caps-specific)
$avatars[2] = "yourfile2.JPG"; // just repeat this as often as you want


$url = 'http://sml.u13.net/files/'; //url of the folder where your avatar pictures are
$avatar_number = rand(1,2); //modify that 2 to be the highest number in your list above
$rand_avatar = "$avatars[$avatar_number]";
header("Location: $url" . "$rand_avatar");
?>[/code]

Save As...

"[yournamehere]avatar.php" with the quotation marks.

Upload php file here: http://sml.u13.net/?p=files

Your Link: http://sml.u13.net/files/[yournamehere]avatar.php



Another alternate example for hotlinking.

<?php
srand((double) microtime() * 1000000);
$avatars[1] = "http://-----------.com/files/image/23432432"; //self-explanatory, really, just put the filename here (caps-specific)
$avatars[2] = "http://-----------.com/files/image/242432"; // just repeat this as often as you want
$avatars[3] = "http://-----------.com/files/image/23432342432";

$avatar_number = rand(1,3); //modify that 3 to be the highest number in your list above
$rand_avatar = "$avatars[$avatar_number]";
header("Location: $rand_avatar");
?>





How about we use m00net because it's better!

nfsjunkie91
December 16, 2005, 2:12 pm
how about we use photobucket or filelodge too! thanks for all these variations on the script guys! unfortunately, my current webhost SUCKS, so i will not use them.

Soulsnipa
December 16, 2005, 2:22 pm
quote:Originally posted by nfsjunkie91how about we use photobucket or filelodge too! thanks for all these variations on the script guys! unfortunately, my current webhost SUCKS, so i will not use them.


because you cant host php files on there can you?