Would someone be able to make this script use "header function to redirect to the main site if a proxy is detected" or else just load the main site if no proxy is detected. Just need a way to prevent the site from being viewed from a web proxy. Here is a code I have that doesnt work but was something I found that was one of the better ones. <?php if ( $_SERVER['HTTP_X_FORWARDED_FOR'] || $_SERVER['HTTP_X_FORWARDED'] || $_SERVER['HTTP_FORWARDED_FOR'] || $_SERVER['HTTP_CLIENT_IP'] || $_SERVER['HTTP_VIA'] || in_array($_SERVER['REMOTE_PORT'], array(8080,80,6588,8000,3128,553,554)) || @fsockopen($_SERVER['REMOTE_ADDR'], 80, $errno, $errstr, 30)) { header('Location: http://www.google.com'); } ?> PHP: it will redirect to google if a proxy is detected but if no proxy is used then it wont the main site. If I put the main site url in place of Google it just keeps reloading the page and never breaks out of the proxy
Ow i did get lost! i missed interpret. but anyways thanks anyway i was talking about sites being redirected to google. goodluck with the code.
Basically, just include this code on every page of your site, except for the home page (the one you want them to be redirected to). If, because of scripting issues, you have to include the code on the home page, there are ways to set it up so the script automatically recognizes that it is on the home page, and doesn't redirect again. If that is the case, let us know, and I or someone else here can stick the code up for you.
I am trying to get a working code that would be for the main page and if they visit that page using a proxy it would break them out of the proxy and then display the page. If no proxy is used it would display the page like normal.
A) Not all variables checked for are always passed by all browsers. B) Doing and fsockopen on each page view, well it will kill your server if you have many users. Peace,