判断用户是否使用代理的PHP代码
时间:2021-07-01 10:21:17
帮助过:3人阅读
- /*****************************************************
- *
- * isProxy
- * check whether client is under Proxy or not
- * $_SERVER['HTTP_X_FORWARDED_FOR'] is pivotal here
- * if client is under Proxy, returns true
- * if client is not under Proxy, returns false
- *
- *****************************************************/
- function isProxy(){
- return (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) ? true : false;
- }
- ?>
|
PHP