What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » Random Image Script (Not KSMAS)

Random Image Script (Not KSMAS)
Author: Message:
fluffy_lobster
Veteran Member
*****

Avatar
Posts: -2

Posts: 1391
Reputation: 23
36 / Male / Flag
Joined: Nov 2002
RE: Random Image Script (Not KSMAS)
Indeed, nice and secure now :)

Personally, I think it's neater to pick the random image like this though:

code:
<?php
$dir = "imgs";
$dh = opendir($dir);
$files = array();
while (false !== ($filename = readdir($dh))) {
$files[] = $filename;
}
sort($files);
array_splice($files, 0, 2);
srand( (double) microtime()*1000000 );
$key = array_rand($files);
readfile($dir . "/" . $files[$key]);
?>

This post was edited on 01-20-2005 at 06:54 PM by fluffy_lobster.
01-20-2005 06:47 PM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Random Image Script (Not KSMAS) - by user27089 on 01-19-2005 at 09:31 PM
RE: Random Image Script (Not KSMAS) - by Plik on 01-19-2005 at 09:34 PM
RE: Random Image Script (Not KSMAS) - by user27089 on 01-19-2005 at 09:37 PM
RE: Random Image Script (Not KSMAS) - by Plik on 01-20-2005 at 06:43 PM
RE: Random Image Script (Not KSMAS) - by fluffy_lobster on 01-20-2005 at 06:47 PM
RE: Random Image Script (Not KSMAS) - by user27089 on 01-20-2005 at 09:34 PM


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