不允许在你的站点上使用代理脚本。
File:proxy.htmlproxy.phpok.html
proxy.php:
<?php $cache = $_SERVER["HTTP_PRAGMA"]; $referer = $_SERVER["HTTP_REFERER"]; $ip = $_SERVER["REMOTE_ADDR"]; if ($_SERVER["REQUEST_METHOD"] == "HEAD") { $proxy = 2; } elseif ($_SERVER["HTTP_X_FORWARDED_FOR"] != "" OR $_SERVER["HTTP_VIA"] != "" OR $_SERVER["HTTP_CLIENT_IP"] != "" OR $_SERVER["HTTP_FROM"] != "" OR $cache != "") { $proxy = 1; } else { $proxy = 0; } if ($proxy == 0) { header ("Location: http://your-url/to-script/ok.html"); } elseif ($proxy == 1) { header("Location: http://your-url/to-script/proxy.html"); } elseif ($proxy == 2) { header("Location: http://your-url/to-script/proxy.html"); } ?>
proxy.html:
<head> <title>YOU'RE USING A PROXY!</title> </head> <body link="#006699" vlink="#006699" alink="#006699"> <p align="center"><font color="#FF0000">You're using a proxy!</font> <p align="center"> </p> <p align="center"><font color="#006699"><a href="http://your-url/to-script/proxy.php">Click here to try again</a></font></p>
ok.html:
<head> <title>You're NOT using a proxy!</title> </head> <body link="#006699" vlink="#006699" alink="#006699"> <p align="center"><font color="#006699">You're </font><font color="#FF0000">NOT</font><font color="#006699"> using a proxy</font> <p align="center"> </p> <p align="center"><font color="#006699"><a href="http://your-url/to-script/proxy.php">Click here to try again</a></font></p>