whatsupron Posted June 15, 2009 Share Posted June 15, 2009 Hi I have a rating website like hotornot.com and I have the option where I can make my users login to rate but I also want the guests to rate and when I allow guests to rate there is lots of spammers just using a proxy with different Ip's and they give unfair rating to everyone, is there anyway or any php script that I can get rid of these scammers??? Quote Link to comment https://forums.phpfreaks.com/topic/162194-block-proxy/ Share on other sites More sharing options...
.josh Posted June 15, 2009 Share Posted June 15, 2009 could add a captcha or honeypot to reduce the bots but as far as real users cheating there's nothing to do about that except force them to login. Quote Link to comment https://forums.phpfreaks.com/topic/162194-block-proxy/#findComment-855932 Share on other sites More sharing options...
MadTechie Posted June 15, 2009 Share Posted June 15, 2009 Not really, but you could try this <?php $proxyheader = array( 'HTTP_VIA', 'HTTP_X_FORWARDED_FOR', 'HTTP_FORWARDED_FOR', 'HTTP_X_FORWARDED', 'HTTP_FORWARDED', 'HTTP_CLIENT_IP', 'HTTP_FORWARDED_FOR_IP', 'VIA', 'X_FORWARDED_FOR', 'FORWARDED_FOR', 'X_FORWARDED', 'FORWARDED', 'CLIENT_IP', 'FORWARDED_FOR_IP', 'HTTP_PROXY_CONNECTION' ); $valid = true; foreach($proxyheader as $p) { if(isset($_SERVER[$p])) { $valid = false; } } if(!$valid){ die ("Using proxy"); } ?> Quote Link to comment https://forums.phpfreaks.com/topic/162194-block-proxy/#findComment-855935 Share on other sites More sharing options...
xcoderx Posted June 15, 2009 Share Posted June 15, 2009 Do we need to include that php code on top of php files to block visitor using proxy? Quote Link to comment https://forums.phpfreaks.com/topic/162194-block-proxy/#findComment-856053 Share on other sites More sharing options...
Zane Posted June 15, 2009 Share Posted June 15, 2009 Why don't you just make the guests' rank weight lower than a regular user. For instance....a guest's vote is worth 33.3% of a regular vote...meaning it takes 3 different guests to actually make a solid vote. And you can always ceil() the current rank of the user to keep it from showing as a decimal number. \ Edit: Actually I meant floor() Quote Link to comment https://forums.phpfreaks.com/topic/162194-block-proxy/#findComment-856058 Share on other sites More sharing options...
Daniel0 Posted June 15, 2009 Share Posted June 15, 2009 Before trying to say you want to "block proxies", maybe you should actually understand what a proxy is and for what reasons it can be used. Proxies may be used in a corporate/school environment to keep external access tight. You could setup the firewall to only allow external access through the proxy and use various forms of content filtering and logging. Besides filtering/logging, another utility caching. Say you run a network with 1000 nodes connected on a daily basis. Instead of each node having their own local cache, you can have a cache on network level by making all the nodes go through that proxy. This means a resource can be downloaded 1 time from the external location, saved and cached somewhere in the LAN and passed on to local clients, thus vastly saving bandwidth because you don't have to download the same things over and over again. Maybe you shouldn't try to block something you don't understand what is and what can be used for. If you do that you won't understand the consequences of it and you probably end up blocking legitimate traffic. There are also some ISPs that route all their customers through a proxy. Quote Link to comment https://forums.phpfreaks.com/topic/162194-block-proxy/#findComment-856061 Share on other sites More sharing options...
haku Posted June 15, 2009 Share Posted June 15, 2009 My cellphone company also runs all our traffic through a proxy. ...which incidentally has gotten me into sites I have been banned from because they don't want to ban the whole company Quote Link to comment https://forums.phpfreaks.com/topic/162194-block-proxy/#findComment-856064 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.