detect proxy
| From: | Miguel Angelo | Date: | Wed, 28 May 2003 10:49:51 +0000 |
| Subject: | detect proxy | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-149306@lists.php.net to get a copy of this message | ||
Hi Sonjaya,
Here is how i detect a proxy / user external ip and internal ip
I use the global variable catched by PHP from the web server,
the web server that i use is Apache i don't know about your's but it might
work.
There are tonns of available information here is some that i have debugged
If you get a
User Browser : $GLOBALS[HTTP_USER_AGENT]
External IP : $GLOBALS[REMOTE_ADDR]
Internal IP : $GLOBALS[HTTP_X_FORWARDED_FOR]
Proxy : $GLOBALS[HTTP_VIA]
Please notice that you might get all, same or partial information from the user
i think the only one that you can trust 100% is the External IP since this is
basic TCP/IP all the rest might be empty or with invalid values. Microsoft ISA
proxy at my job for example does not foward the internal user IP.
try something print_r($GLOBALS) to check out all the avaliable
informations
you could do something like this
if ( $GLOBALS[HTTP_VIA] == "" ) {
echo "User Proxy is Not Available <br>";
}
else {
echo "User Proxy: $GLOBALS[HTTP_VIA] <br>";
}
Hope this help you !
Stay happy
Miguel Angelo
From: sonjaya <sonjaya@stud.che.itb.ac.id>
To: php-general <php-general@lists.php.net>
Date: Wed, 28 May 2003 18:02:26 +0700
Subject: detect proxy
dear milist
any body now script to detect browser also ip event using proxy public or
high anonymous .thank's