$value ) {
if ( stripos($key, 'http') === 0 ) {
$key = strtolower(substr($key, 5));
echo "$key:$value\n";
}
}
exit;
}
if ( isset($_GET['multiple-headers']) ) {
header("HeaderName: One", false);
header("HeaderName: Two", false);
header("HeaderName: Three", false);
exit;
}
$rt = isset($_GET['rt']) ? $_GET['rt'] : 5;
$r = isset($_GET['r']) ? $_GET['r'] : 0;
/*if ( $r === 0 ) {
header("Location: http://tools.dd32.id.au/redirect/?r=1" );
exit;
}*/
if ( $r < $rt ) {
$code = isset($_GET['code']) ? (int)$_GET['code'] : 302;
header("Location: $url?rt=" . $rt . "&r=" . ($r+1), true, $code);
echo "Redirect $r of $rt";
exit;
}
echo "Redirect $r of $rt is FINAL.
";
echo "GET['rt'] = Total times to redirect. Defaults to 5.
";
echo "GET['r'] = Current redirection. Defaults to 0.
";
echo "View Source";