PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
Zorth
Forum Commoner
Posts: 76 Joined: Fri Feb 20, 2004 8:00 pm
Post
by Zorth » Sun Jul 04, 2004 7:28 pm
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.
ol4pr0
Forum Regular
Posts: 926 Joined: Thu Jan 08, 2004 11:22 am
Location: ecuador
Post
by ol4pr0 » Sun Jul 04, 2004 7:39 pm
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
Zorth
Forum Commoner
Posts: 76 Joined: Fri Feb 20, 2004 8:00 pm
Post
by Zorth » Sun Jul 04, 2004 11:09 pm
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.
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Mon Jul 05, 2004 12:31 am
if they don't send that information, there is almost no way for the server to tell if they are proxied..
Zorth
Forum Commoner
Posts: 76 Joined: Fri Feb 20, 2004 8:00 pm
Post
by Zorth » Mon Jul 05, 2004 9:57 am
Well I suppose most proxies that don't send that kind of information are legit anyways, right?
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Mon Jul 05, 2004 12:28 pm
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..