Posted By

pgmr on 03/19/09


Tagged

block users proxy


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

pgmr
lajevardi


Block proxy users from your site


 / Published in: PHP
 

URL: http://www.pgmr.co.uk

Checks browser headers to see if the user is on a proxy and stops them from viewing whatever page you want. Just call the function at the top of the page. www.pgmr.co.uk for more ;)

  1. <?php
  2.  
  3. /**
  4.  * Block Proxy Script
  5.  * Copyright 2009 - www.pgmr.co.uk - [email protected]
  6.  */
  7.  
  8. function checkProxy {
  9. if($_SERVER['HTTP_X_FORWARDED_FOR'] || $_SERVER['HTTP_X_FORWARDED'] || $_SERVER['HTTP_FORWARDED_FOR'] || $_SERVER['HTTP_CLIENT_IP'] || $_SERVER['HTTP_VIA']) {
  10. die('No proxies allowed');
  11. }
  12. }
  13.  
  14. ?>

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: ankie147 on June 9, 2018

Yes your coding give very good response for the browser proxy how to fix active directory domain services. In the browser when we see problem like this then it come can be used without any type of the doubt.

You need to login to post a comment.