Unregistered Avatar

Reply

Random sig not being very random


 
LinkBack Thread Tools Display Modes

  #1 (permalink)  

Old 09-22-2006, 03:30 PM

Random sig not being very random

Fixed Version.

PHP Code:
<?php
$folder 
'';
$exts 'jpg jpeg png gif';

$files = array(); $i = -1;
if (
'' == $folder$folder './';

$handle opendir($folder);
$exts explode(' '$exts);
while (
false !== ($file readdir($handle))) {
    foreach(
$exts as $ext) {
        if (
preg_match('/\.'.$ext.'$/i'$file$test)) {
            
$files[] = $file;
            
$i++;
            }
        }
    }
closedir($handle);
mt_srand((double)microtime()*1000000);
$rand mt_rand(0$i);

header('Location: '.$folder.$files[$rand]);
?>
Broken php was removed.

Also I see no coding support forum so in here I posts it. It wont be random and it will. The image changes everytime I restart FF?*
__________________


/Oh look, my gaydar keeps pointing south? No, wait, it's just pointing at me.../


/F665AB/
/*If you believed this, are you this guy?/

Last edited by Conan : 09-22-2006 at 05:35 PM.

Conan is offline [ Voiderator ]

Conan's Avatar

Join Date: Nov 2004

Location: The Void.*

Posts: 826

Send a message via ICQ to Conan Send a message via AIM to Conan Send a message via MSN to Conan

  #2 (permalink)  

Old 09-22-2006, 05:27 PM

Re: Random sig not being very random

++$i; should be $i++;
__________________
Audi Videos | MySpace Layouts | About Me

missionsix is offline loves you.

missionsix's Avatar

Join Date: Feb 2004

Location: under you.

Posts: 4,774

Send a message via AIM to missionsix Send a message via MSN to missionsix

  #3 (permalink)  

Old 09-22-2006, 05:30 PM

Re: Random sig not being very random

Quote:
Originally Posted by Pat View Post
++$i; should be $i++;
Bwahaha, it works now! Thanks again brother.*
__________________


/Oh look, my gaydar keeps pointing south? No, wait, it's just pointing at me.../


/F665AB/
/*If you believed this, are you this guy?/

Conan is offline [ Voiderator ]

Conan's Avatar

Join Date: Nov 2004

Location: The Void.*

Posts: 826

Send a message via ICQ to Conan Send a message via AIM to Conan Send a message via MSN to Conan
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sprite Sig mehmet Signature Showcase 45 08-05-2006 10:38 AM
Random thread Doctor The VOID! 39 06-30-2006 06:12 PM
I've got sig maker's block Myrmidon Signature Showcase 1 01-30-2006 01:17 PM
Random mouse movement LuKa 3D Art and Animation 2 12-31-2005 12:24 PM
Boredom = Random Words AvalonX The VOID! 16 12-02-2005 08:29 PM


All times are GMT -7. The time now is 10:24 PM.