PHP Code:
<?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.co...igs/squeeky.php) and paste it with [img] tags in your sig. Viola!
Goodluck.