What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » Help-Random sig

Help-Random sig
Author: Message:
-dt-
Scripting Contest Winner
*****

Avatar
;o

Posts: 1819
Reputation: 74
36 / Male / Flag
Joined: Mar 2004
RE: Help-Random sig
php 4 method , also no offence but I find kmas way too complex for such a simple thing
code:
<?php
error_reporting(E_ALL ^ E_NOTICE);


$folderdir = "./pics"; //EDIT THIS
$types = array('jpeg','.png','.bmp','.jpg','.gif');

//------ dont edit--------
$dir = array();
$folder=opendir($folderdir);
while ($file = readdir($folder)) $dir[] = $file;
closedir($folder);
$files = array();
for ($i=0;$dir[$i];$i++){
$ext=strtolower(substr($dir[$i],-4));
if (in_array($ext,$types)){
$files[]=$dir[$i];
    }
}

$image =  $files[rand(0,count($files)-1)];
$ext=strtolower(substr($image,-4));
$ext = str_replace('.','',$ext);

Header ("Content-type: image/$ext");
readfile($folderdir . '/' .$image);


?>

[Image: dt2.0v2.png]      Happy Birthday, WDZ
07-06-2005 04:07 AM
Profile PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Help-Random sig - by Lou on 07-05-2005 at 04:33 AM
RE: Help-Random sig - by ShawnZ on 07-05-2005 at 04:39 AM
RE: Help-Random sig - by John Anderton on 07-05-2005 at 04:43 AM
RE: Help-Random sig - by ipab on 07-05-2005 at 05:17 AM
RE: Help-Random sig - by -dt- on 07-05-2005 at 05:56 AM
RE: Help-Random sig - by Lou on 07-05-2005 at 04:00 PM
RE: Help-Random sig - by ipab on 07-05-2005 at 11:02 PM
RE: Help-Random sig - by Lou on 07-06-2005 at 01:05 AM
RE: Help-Random sig - by ipab on 07-06-2005 at 01:34 AM
RE: Help-Random sig - by Lou on 07-06-2005 at 02:21 AM
RE: Help-Random sig - by -dt- on 07-06-2005 at 04:07 AM
RE: Help-Random sig - by Lou on 07-06-2005 at 10:16 PM
RE: Help-Random sig - by ipab on 07-07-2005 at 12:30 AM
RE: Help-Random sig - by Lou on 07-07-2005 at 01:11 AM
RE: Help-Random sig - by John Anderton on 07-07-2005 at 11:22 AM
RE: Help-Random sig - by KeyStorm on 07-12-2005 at 02:40 PM
RE: Help-Random sig - by absorbation on 07-12-2005 at 03:00 PM
RE: Help-Random sig - by KeyStorm on 07-12-2005 at 05:21 PM
RE: Help-Random sig - by absorbation on 07-12-2005 at 05:27 PM
RE: Help-Random sig - by L. Coyote on 07-12-2005 at 10:20 PM
RE: Help-Random sig - by KeyStorm on 07-12-2005 at 11:00 PM
RE: Help-Random sig - by leito on 07-13-2005 at 12:39 AM
RE: Help-Random sig - by L. Coyote on 07-13-2005 at 01:44 AM
RE: Help-Random sig - by KeyStorm on 07-13-2005 at 06:07 PM
RE: Help-Random sig - by L. Coyote on 07-13-2005 at 10:04 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