Random Number Generators

Status
Not open for further replies.

shan

Daemon Poster
Messages
1,364
I'm still confused on the title? It says ransom number generators? are you getting violent on use now?? hahahah.

PHP has a random number generator, it's easy to use too....
PHP:
<?
$myvar = rand(1,10);
echo $myvar ?>

Really you could have it rand(100000,10000000000000000000) and make some complex numbers really and if you wanted a pattern, it'd be hard to detect with a 1000 digit number :)
 
Yea, but the random number is just that random. I really don't know....I guess i could write a script like this

PHP:
<?
$myran = rand(1,50);
$cur = 0;
$end = 1000;
while ($cur < $end){
echo "$myran ";
$cur++;
}
?>
What this would do would display a random number as many times as you want you can set the $end number higher, but after about 1000 times if there is a pattern you'd be able to it :)
 
Status
Not open for further replies.
Back
Top Bottom