What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » General » General Chit Chat » Random Signature

Random Signature
Author: Message:
Jimbo
Veteran Member
*****

Avatar

Posts: 1650
Reputation: 18
31 / Male / Flag
Joined: Jul 2006
RE: Random Signature
quote:
Originally posted by Eddie
but i dont want it to collect from a directory but links instead. thanks


quote:
Originally posted by MeEtc
I have one, should work for you. Let be go find the code....
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");
Header("Content-Type: image/png");

$dir = "imgs" ;

srand((double)microtime()*1000000);
$i = 0;
$dirHandle = opendir($dir);
while(($im = readdir($dirHandle))) {
    if($im != ".." && $im != "."){
        $image[$i] = $im;
        $i++;
    }
}
closedir($dirHandle);
$n = rand(0,(count($image)-1));

if(!readfile($dir."/".$image[$n]))
readfile($dir."default.image");
?>
just be sure to put the images ina folder called 'imgs' and specify a default at the bottom

:dodgy:
11-21-2007 06:55 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Random Signature - by Eddie on 11-21-2007 at 08:23 AM
RE: Random Signature - by andrey on 11-21-2007 at 03:56 PM
RE: RE: Random Signature - by Justin on 12-02-2007 at 01:53 AM
RE: Random Signature - by Jimbo on 11-21-2007 at 06:55 PM
RE: Random Signature - by Eddie on 11-22-2007 at 05:33 AM
RE: Random Signature - by Chris4 on 12-02-2007 at 02:05 AM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On