Page 1 of 1
Checking for Proxy Connections
Posted: Sun Jul 04, 2004 7:28 pm
by Zorth
Hey all,
Is there a way to see if the person connecting to a page is connecting with a proxy server? Would be usefull to get rid of spammers on my forums who connect using them.
Thanks.
Posted: Sun Jul 04, 2004 7:39 pm
by ol4pr0
Code: Select all
#something like this..
<?
if(isset($HTTP_X_FORWARDED_FOR))
{
if ($HTTP_X_FORWARDED_FOR)
{
// proxy detected...
?>
<b>Proxy Detected...</b><br>
Your Actual IP Address:
<i><?= $HTTP_X_FORWARDED_FOR ?></i><br>
Your Proxy Server:
<i><?= $HTTP_VIA ?></i>
<BR> You Proxy I.P address: <?= $REMOTE_ADDR ?><br>
<?
}
}
else
{
// no proxy detected
?>
<b>No Proxy Detected</b><br>
Your Actual IP Address:
<i><?= $REMOTE_ADDR ?></i><br>
<?
}
?>
You also might wanna take a look @ this.
http://www.php.net/getenv
Posted: Sun Jul 04, 2004 11:09 pm
by Zorth
I am hearing that there are some proxies that block out the variables
HTTP_X_FORWARDED_FOR, HTTP_VIA and HTTP_PROXY_CONNECTION
Are there ways to track proxy connections from proxies that don't send these?
Thanks.
Posted: Mon Jul 05, 2004 12:31 am
by feyd
if they don't send that information, there is almost no way for the server to tell if they are proxied..
Posted: Mon Jul 05, 2004 9:57 am
by Zorth
Well I suppose most proxies that don't send that kind of information are legit anyways, right?
Posted: Mon Jul 05, 2004 12:28 pm
by feyd
from what I remember, not sending that information if you are a proxy, classifies you as non-conforming.. however, there's nothing stopping someone from doing it..