|
| Web Hosting Deals | Holiday Logo Design | Webcam Chat | Website Header Templates | Register domain | Search Engine Optimisation | Web Hosting |
|
|||||||
| PHP / Perl / Java / JavaScript / CGI Tutorials PHP / Perl / Java / JavaScript / CGI Tutorials Please do not use this Forum to advertise your site or to link to tutorials. |
![]() |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
Detect Proxy [For ur Website]
Easily detect most kinds of proxies and even determine a user's real IP address.
Most proxy servers that are free to the public also send along certain things in their HTTP headers. They send (typically) 3 extra things that can be used to detect them. They are Code:
: HTTP_X_FORWARDED_FOR HTTP_PROXY_CONNECTION HTTP_VIA The basic way the script below works, is it checks to see if any of these are set. If they are, then you're definately using a proxy. It also checks to see if the word "proxy" is contained in the remote host name. This occurs frequently and is obviously a dead give away. Most proxies are intended to be used to speed up a slow connection you might have and avoid spyware and cookies. This script can't detect EVERY proxy, because not every proxy is detectable. High anonymity proxies (sometime's called "elite" proxies...because they make you feel special) are proxies that are designed to keep their users hidden at all times. Reliable ones aren't easy to come by and are usually private. If you want to use the function below, could use something like the following: PHP Code:
somewhere. This method returns a BOOLEAN true on success, FALSE on failure. duh. If the code is confusing to you, that's because I'm using a special kind of boolean expressions (to save space) that I might cover in another tutorial. PHP Code:
|
|
||||
|
Very nice tutorial.
A little more explanation wouldn't go amis. But a good tutorial none the less, and a usefull one at that + reputation! Base
__________________
http://www.pointserv.co.uk/gfx/deal_..._pointserv.png PointServ.co.uk - One of the UK's cheapest webhosting companies. |
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|