PHP code to determine whether the user is using a proxy

WBOY
Release: 2016-07-25 08:42:26
Original
1321 people have browsed it
  1. /*****************************************************
  2. *
  3. * isProxy
  4. * check whether client is under Proxy or not
  5. * $_SERVER['HTTP_X_FORWARDED_FOR'] is pivotal here
  6. * if client is under Proxy, returns true
  7. * if client is not under Proxy, returns false
  8. *
  9. *****************************************************/
  10. function isProxy(){
  11. return (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) ? true : false;
  12. }
  13. ?>
Copy code

PHP


source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!