PHP简单实现不同ip段,访问不同页面或网站 PHP <?php $curIP = $_SERVER['REMOTE_ADDR']; if (strcmp($curIP, "200.200.200.1") >= 0 && strcmp($curIP, "200.200.200.255") <= 0) header("Location: index.htm"); else header("Location: http://www.skyfox.org"); ?> 1234567 <?php$curIP = $_SERVER['REMOTE_ADDR'];if (strcmp($curIP, "200.200.200.1") >= 0 && strcmp($curIP, "200.200.200.255") <= 0)header("Location: index.htm");elseheader("Location: http://www.skyfox.org");?> Location: 后可以接文件名,或者其他域名 转载请注明:天狐博客 » PHP简单实现不同ip段,访问不同页面或网站