View Full Version : Sig code?
BUGGER
2003-12-30, 03:19 AM
What is it(the one that switches your sig every load)? I cant search it or find it anywhere else.
Thx in advance.
Hamma
2003-12-30, 03:23 AM
PHP sig.
BUGGER
2003-12-30, 04:34 AM
Ya....but it wont let me search anything thats 3 letters or smaller.
/edit i mean the code, not name
Squeeky
2003-12-30, 04:35 AM
<?php
//read folder
$folder=opendir("." );
$names = Array();
while ($file = readdir($folder))
$names[count($names)] = $file;
closedir($folder);
//sort file names in array
sort($names);
//remove any non-images from array
$tempvar = 0;
foreach ($names as $name)
{
$ext = strtolower(substr($name,-4));
if ($ext==".jpg"||$ext==".gif"||$ext=="jpeg"||$ext==".png" )
$names1[] = $name;
}
//random
srand ((double) microtime() * 10000000);
$rand_keys = array_rand ($names1, 2);
//random image from array
$slika = $names1[$rand_keys[0]];
//image dimensions
$dimensions = GetImageSize($slika);
header ("Location: http://staff.planetside-universe.com/squeeky/Sigs/$slika" )
?>
That is the script, if your a PHP noobie copy paste all that code into Notepad, change the http://staff.planetside-universe.com/squeeky/Sigs/$slika to the appropriate directory and on the "Save As" drop down box select "All Files" and save as sigs.php
Upload to the directory defined in the .php script (the part you edited) and then upload all images you want to that directory (script supports .jpg, .gif, .png, .bmp). Then take the URL (in my case http://staff.planetside-universe.com/squeeky/Sigs/squeeky.php) and paste it with [img] tags in your sig. Viola!
Goodluck.
BUGGER
2003-12-30, 04:41 AM
Fun fun, thx. ;)
FlakMan
2003-12-30, 11:39 AM
My sig got pwnt for using a script that does the same thing, and I know someone *cough*corrosion*cough* does the same thing with even larger sigs and gets away with it :(
Corrosion
2003-12-30, 02:41 PM
ph34r me 1337 skillzes.
thx to Squeeky for code, I wouldn't have my sig without him.
vBulletin® v3.8.7, Copyright ©2000-2024, vBulletin Solutions, Inc.