<?php
header("Cache-Control: no-cache");
header("Pragma: no-cache");
$fail = gpc("fail");
if ($fail == "1")
{
$fail = rand(1, 4);
if ($fail == 2)
{
$status = array("HTTP/1.1 403 Forbidden", "HTTP/1.1 404 Not Found", "HTTP/1.1 500 Internal Server Error", "HTTP/1.1 501 Not Implemented", "HTTP/1.1 502 Bad Gateway", "HTTP/1.1 503 Service Unavailable");
$fail = $status[array_rand($status)];
header($fail . "\n\n");
exit;
}
}
$delay = gpc("delay");
if ($delay != "")
sleep($delay);
else
{
$sleep = rand(1, 4);
if ($sleep > 1)
{
$delay = rand(1, 10);
sleep($delay);
}
}
$requestID = gpc("id");
print "Returned at " . date("M d y h:i:s A");
function gpc($name)
{
if (isset($_GET[$name]))
return $_GET[$name];
else if (isset($_POST[$name]))
return $_POST[$name];
else if (isset($_COOKIE[$name]))
return $_COOKIE[$name];
else
return "";
}
?>