Jump to content

Recommended Posts

Any one who is using IP's that are known to be used by proxies....which would allow people to have multiple accounts on different IPs.

 

But there must be thousands of IPs that many proxys use thus if there was a way to get a list of the known proxy IPs i could block them from access to my site.

Link to comment
https://forums.phpfreaks.com/topic/137205-proxy-blocking/#findComment-716739
Share on other sites

Well I don't know of any Proxt-IP Lists, but to get started, you could use this function (or similar):

 

<?php
function detectProxy(){
	if($_SERVER['HTTP_X_FORWARDED_FOR']) {
		if($_SERVER['HTTP_CLIENT_IP'])
			$proxy = $_SERVER['HTTP_CLIENT_IP'];
		else
			$proxy = $_SERVER['REMOTE_ADDR'];
		$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
	} else {
		if($_SERVER['HTTP_CLIENT_IP'])
			$ip = $_SERVER['HTTP_CLIENT_IP'];
		else
			$ip = $_SERVER['REMOTE_ADDR'];
	}
	if(isset($proxy))
		die('You appear to be hiding behind the proxy address: ' . $proxy);
}
?>

 

It's a bit crude, but it can be improved.

Link to comment
https://forums.phpfreaks.com/topic/137205-proxy-blocking/#findComment-717215
Share on other sites

Well I don't know of any Proxt-IP Lists, but to get started, you could use this function (or similar):

 

<?php
function detectProxy(){
	if($_SERVER['HTTP_X_FORWARDED_FOR']) {
		if($_SERVER['HTTP_CLIENT_IP'])
			$proxy = $_SERVER['HTTP_CLIENT_IP'];
		else
			$proxy = $_SERVER['REMOTE_ADDR'];
		$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
	} else {
		if($_SERVER['HTTP_CLIENT_IP'])
			$ip = $_SERVER['HTTP_CLIENT_IP'];
		else
			$ip = $_SERVER['REMOTE_ADDR'];
	}
	if(isset($proxy))
		die('You appear to be hiding behind the proxy address: ' . $proxy);
}
?>

 

It's a bit crude, but it can be improved.

 

Would this block AOL users as im told they are seen as proxy servers? Even though they are fairly legitmate ?

Link to comment
https://forums.phpfreaks.com/topic/137205-proxy-blocking/#findComment-717311
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.