Unstoppable Domains โ€” AI Assistant

[Resolved] Is there a way to detect if a users is using a proxy or not?

SpaceshipSpaceship
Watch

Jawn

Straight from SwedenEstablished Member
Impact
2
Is there a way to detect if a users is using a proxy or not?

Is there a way to detect if a users is using a proxy or not?
Possible?
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
Not really.. - in the case of IP's, there's some code where you can *try* to get their real IP, but not all proxies pass along the users original IP address. There's no true way to determine if someone is behind a proxy, afaik.
 
0
•••
You could try checking if $_SERVER['HTTP_X_FORWARDED_FOR'] is populated if it is then it will be the real ip of the visitor (it is only populated if someone accessed your page via a proxy) but if the user is using an anonymous proxy (or a proxy website) you will only see the ip of the proxy/webpage.
 
0
•••
There is software which is available to detect if a user is using a proxy (browser) and detecting if it is web based proxy.. Is just as simple as checking the referral url and looking for parts, such as your site url, etc.

- Steve
 
0
•••
Pulled this from my DNP project...

PHP:
/**
* Get the users ip address - for the contact form.
* Borrowed from MyBB and modified - MyBBoard.com
*
* @param  none
* @return string
*/
function get_ip()
{
	if (dnp_getenv('HTTP_X_FORWARDED_FOR'))
	{
		if (preg_match_all("#[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}#s", dnp_getenv('HTTP_X_FORWARDED_FOR'), $ips))
		{
			while (list($key, $val) = @each($ips[0]))
			{
				if (!preg_match("#^(10|172\.16|192\.168)\.#", $val))
				{
					$ip = $val;
					break;
				}
			}
		}
	}
	else if (dnp_getenv('HTTP_CLIENT_IP'))
	{
		$ip = dnp_getenv('HTTP_CLIENT_IP');
	}
	else if (dnp_getenv('HTTP_FROM'))
	{
		$ip = dnp_getenv('HTTP_FROM');
	}
	else
	{
		$ip = dnp_getenv('REMOTE_ADDR');
	}
	return preg_replace('#([^0-9,\.]+)#', '', $ip);
}

/**
* Returns an environment variable. Based on PMA_getenv from phpMyAdmin.
*
* @param  string  Variable name, eg: PHP_SELF
* @return string
*/
function dnp_getenv($varname)
{
	if (isset($_SERVER[$varname]))
	{
		return $_SERVER[$varname];
	}
	else if (isset($_ENV[$varname]))
	{
		return $_ENV[$varname];
	}
	else if (getenv($varname))
	{
		return getenv($varname);
	}
	return '';
}
 
0
•••
iNod said:
There is software which is available to detect if a user is using a proxy (browser) and detecting if it is web based proxy.. Is just as simple as checking the referral url and looking for parts, such as your site url, etc.

- Steve


where can i find that software?
 
0
•••
iNod said:
There is software which is available to detect if a user is using a proxy (browser) and detecting if it is web based proxy.. Is just as simple as checking the referral url and looking for parts, such as your site url, etc.

- Steve

Although only affecting a small % of users this could stop valid users as some firewalls block the browser sending the address of the referring site.
 
0
•••
0
•••
CatchedCatched
Escrow.com
Spaceship
Rexus Domain
CryptoExchange.com
Domain Recover
CatchDoms
NameMaxi - Your Domain Has Buyers
DomDB
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back