Save the code below to a file called index.php and put it in in a directory called randomsig.png along with your sig files.
CODE
<?php Header("Content-Type: image/gif");
$sigarray=array();
if ($handle = opendir("./")) {
while (false !== ($file = readdir($handle))) {
if(stristr($file, ".gif") or stristr($file, ".jpg") or stristr($file, ".png")){
array_push($sigarray,$file);} } }
closedir($handle);
shuffle($sigarray);
readfile(end($sigarray));?>
$sigarray=array();
if ($handle = opendir("./")) {
while (false !== ($file = readdir($handle))) {
if(stristr($file, ".gif") or stristr($file, ".jpg") or stristr($file, ".png")){
array_push($sigarray,$file);} } }
closedir($handle);
shuffle($sigarray);
readfile(end($sigarray));?>
Then put the following code in your signature block.
CODE
[IMG]http://your.domain.name/randomsig.png[/IMG]
Obviously change 'your.domain.name' to YOUR domain or subdomain name.
Those that know a little about PHP will notice I have not 'seeded' the random number generator, this is because it is not required with the version of PHP used at Trap17.
That's all there is to it, enjoy!

