...

View Full Version : Allowing "approved" proxy's



lesliegy
03-21-2010, 11:22 PM
Hey gang,
I'm currently using the following code to prevent people behind proxies from accessing my site.


if( @fsockopen( $_SERVER['REMOTE_ADDR'], 80, $errstr, $errno, 1 ) )
{
die("You cannot use a proxy to enter this site. So please don't TRY! ");
}


The problem I'm now having is, proxies are becoming more and more common in work places (not just for hackers anymore LOL).
I would like to allow certain proxy IP's to be approved. Is this possible??

Thanks
Les-

lesliegy
03-23-2010, 05:47 AM
bump
anyone able to help me??
:D

lesliegy
03-31-2010, 05:45 PM
197 views and no one can help me... :D

I know there's someone out there that has an answer:confused:
PLEEEEAAAASSSSE

TripBR
03-31-2010, 06:49 PM
197 views and no one can help me... :D

I know there's someone out there that has an answer:confused:
PLEEEEAAAASSSSE

What you think about this?




if( @fsockopen( $_SERVER['REMOTE_ADDR'], 80, $errstr, $errno, 1 ) )
{
$con = mysql_connect("localhost","peter","abc123");
if (!$con){
die('Could not connect: ' . mysql_error());
}
mysql_select_db("my_db", $con);

$result = mysql_query("SELECT white_list_proxy_id FROM proxys WHERE `ip` = '".$_SERVER['REMOTE_ADDR']."' ");
$white_ip = $result['white_list_proxy_id'];
mysql_close($con);

$if ( $white_ip == "") {
die("You cannot use a proxy to enter this site. So please don't TRY! ");
}
}


Than u could work on a nice admin page to add white listed proxys :]

lesliegy
04-02-2010, 07:40 PM
What you think about this?




if( @fsockopen( $_SERVER['REMOTE_ADDR'], 80, $errstr, $errno, 1 ) )
{
$con = mysql_connect("localhost","peter","abc123");
if (!$con){
die('Could not connect: ' . mysql_error());
}
mysql_select_db("my_db", $con);

$result = mysql_query("SELECT white_list_proxy_id FROM proxys WHERE `ip` = '".$_SERVER['REMOTE_ADDR']."' ");
$white_ip = $result['white_list_proxy_id'];
mysql_close($con);

$if ( $white_ip == "") {
die("You cannot use a proxy to enter this site. So please don't TRY! ");
}
}


Than u could work on a nice admin page to add white listed proxys :]

YES!!!!
Thanks so much, this is what I was looking for... now I have the starting point I so badly needed.

This site rocks!:thumbsup:



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum