Netscape rand() not random

From: Date: Wed, 17 Jan 2001 18:39:30 +0000
Subject: Netscape rand() not random
Groups: php.general 
Request: Send a blank email to php-general+get-35100@lists.php.net to get a copy of this message
Hello, I have been toying with php for a short while and have problems getting the following code to correctly execute on Netscape: <?php header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Last-Modified: ".gmdate("D, d M Y H:i:s",getlastmod())." GMT"); header ("Cache-Control: no-cache, must-revalidate"); header ("Pragma: no-cache"); for($i=0; $i<40; $i++) { $rand= rand(1, 40); print "$rand<BR>"; } ?> I included the headers because I thought this would prevent caching, but even still, everytime I reload and shift-reload Netscape (browser cache is set to zero) I receive the same output from first access, which really ruins any true random activity. Any ideas? thanks much, Joel Dossey __________________________________________________ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/

« previous php.general (#35100) next »