EchoFool Posted December 16, 2008 Share Posted December 16, 2008 Does any one know any sites which provide PHP scripts that contain IPs that proxy's use that block the IPs from accessing a website? It would come in very handy for my website. Quote Link to comment https://forums.phpfreaks.com/topic/137205-proxy-blocking/ Share on other sites More sharing options...
waterssaz Posted December 16, 2008 Share Posted December 16, 2008 Who exactly are you trying to block? If you know the IP addresses that you wish to block then this is relatively simple. Quote Link to comment https://forums.phpfreaks.com/topic/137205-proxy-blocking/#findComment-716737 Share on other sites More sharing options...
EchoFool Posted December 16, 2008 Author Share Posted December 16, 2008 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. Quote Link to comment https://forums.phpfreaks.com/topic/137205-proxy-blocking/#findComment-716739 Share on other sites More sharing options...
waterssaz Posted December 16, 2008 Share Posted December 16, 2008 sorry don't know then Quote Link to comment https://forums.phpfreaks.com/topic/137205-proxy-blocking/#findComment-716758 Share on other sites More sharing options...
EchoFool Posted December 16, 2008 Author Share Posted December 16, 2008 Ok hopefully some one will know .. Quote Link to comment https://forums.phpfreaks.com/topic/137205-proxy-blocking/#findComment-716777 Share on other sites More sharing options...
Lamez Posted December 16, 2008 Share Posted December 16, 2008 here is what you can do, is make a php script to log IPs into a database, then go and find some proxys, and visit the script with the proxy, then you will have a DB full of proxys' of ips. Quote Link to comment https://forums.phpfreaks.com/topic/137205-proxy-blocking/#findComment-716782 Share on other sites More sharing options...
EchoFool Posted December 16, 2008 Author Share Posted December 16, 2008 That was the main idea i had but wouldn't there be like thousands of proxys to sort out? Is there not any known list of bad IP's created for users to block with php ? Quote Link to comment https://forums.phpfreaks.com/topic/137205-proxy-blocking/#findComment-717184 Share on other sites More sharing options...
.josh Posted December 16, 2008 Share Posted December 16, 2008 I'd suggest googling "known proxy ip addresses" but you obviously must have already tried that Quote Link to comment https://forums.phpfreaks.com/topic/137205-proxy-blocking/#findComment-717199 Share on other sites More sharing options...
Goldeneye Posted December 17, 2008 Share Posted December 17, 2008 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. Quote Link to comment https://forums.phpfreaks.com/topic/137205-proxy-blocking/#findComment-717215 Share on other sites More sharing options...
EchoFool Posted December 17, 2008 Author Share Posted December 17, 2008 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 ? Quote Link to comment https://forums.phpfreaks.com/topic/137205-proxy-blocking/#findComment-717311 Share on other sites More sharing options...
Goldeneye Posted December 17, 2008 Share Posted December 17, 2008 Well the only way they'll be seen by this script as a proxy is if the AOL's proxy servers set the HTTP_X_FORWARDED_FOR or HTTP_CLIENT_UP variable. The only thing I could recommend is asking AOL users to try and access your site while you have the function enabled. Quote Link to comment https://forums.phpfreaks.com/topic/137205-proxy-blocking/#findComment-717455 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.