View Single Post
Old 11-14-2002, 04:39 PM  
strainer
Confirmed User
 
Join Date: Oct 2002
Location: Philadelphia
Posts: 418
Ok, here is how Boldy's original idea worked great for me:

// Range of numbers
$min = "1"; // Min number
$max = "10"; // Max number

mt_srand(time()); // mt_srand() is used to seed mt_rand()

$RandomValue = mt_rand( $min, $max);

if ($RandomValue == 10) {
header("HTTP/1.0 200 OK");
//echo ( "fooey" ) ;
}

What this does now is only return the 200 OK 10% of the time. The other 90% of the time the user can hit the back key after they see a nice error page. I think I am going to change this to say, 1 ouf 20 and put in production now. Looks great in test...
strainer is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote