指定した回数分リダイレクトする。
携帯には、リダイレクトの回数制限があるらしい。
何回リダイレクトできるか試してみる。
<?php if (is_numeric($_REQUEST['c'])) { $c = max($_REQUEST['c'] - 1, 0); } else { $c = 0; } if ($c > 0) { $host = $_SERVER['HTTP_HOST']; $uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\'); $extra = "loop.php?c={$c}"; header("Location: http://$host$uri/$extra"); exit; } ?><html> <body> Finished! </body> </html>