Webmaster Forum

Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.


Reply
 
LinkBack Thread Tools Display Modes
Share |
  #1 (permalink)  
Old 10-25-2010, 06:34 AM
synbitz's Avatar
Contributing Member
Latest Blog:
None

 
Join Date: 11-29-09
Location: belgium
Posts: 185
iTrader: 0 / 0%
BLOCKING DAMN PROXY SERVERS!!

my sites getting flooded with fake votes/reviews trough proxy servers... I need to stop this! anyway i tried this :

PHP Code:
function SimpleProxyDetect ()
{
    
$PROXY false;
    
        if (isset(
$_SERVER['HTTP_VIA'],$_SERVER['HTTP_X_FORWARDED_FOR'],$_SERVER['HTTP_FORWARDED_FOR'],
                  
$_SERVER['HTTP_X_FORWARDED'],$_SERVER['HTTP_FORWARDED'],$_SERVER['HTTP_CLIENT_IP'],
                  
$_SERVER['HTTP_FORWARDED_FOR_IP'],$_SERVER['VIA'],$_SERVER['X_FORWARDED_FOR'],
                  
$_SERVER['FORWARDED_FOR'],$_SERVER['X_FORWARDED'],$_SERVER['FORWARDED'],
                  
$_SERVER['CLIENT_IP'],$_SERVER['FORWARDED_FOR_IP'],$_SERVER['HTTP_PROXY_CONNECTION']
        ))
        {
            
$PROXY true
        }
    return 
$PROXY;

but it just doesnt seem to work :/ when i checked if i could detect hidemyass.com it failed :s can someone help me??
__________________
free web hosts
 
Reply With Quote
  #2 (permalink)  
Old 10-25-2010, 02:52 PM
Contributing Member
Latest Blog:
None

 
Join Date: 01-16-10
Posts: 151
iTrader: 0 / 0%
Hi Synbitz, remember me?

If multiple parameters are supplied then isset() will return TRUE only if all of the parameters are set. Evaluation goes from left to right and stops as soon as an unset variable is encountered. Source

I'm pretty sure... too!
 
Reply With Quote
  #3 (permalink)  
Old 10-25-2010, 08:09 PM
clonepal's Avatar
Junior Member
 
Join Date: 10-25-10
Posts: 8
iTrader: 0 / 0%
Can you give us the link so we can see the voting script on your website?

Then we can advice you better.

-Alex
 
Reply With Quote
  #4 (permalink)  
Old 10-26-2010, 08:11 AM
synbitz's Avatar
Contributing Member
Latest Blog:
None

 
Join Date: 11-29-09
Location: belgium
Posts: 185
iTrader: 0 / 0%
Quote:
Originally Posted by clonepal View Post
Can you give us the link so we can see the voting script on your website?

Then we can advice you better.

-Alex
well yes i changed the voting system with manual approval & comments are obligatory now. still i want to block proxy sites however : )

http://www.webhost-choice.com/freewebhosts/

click a host there, then click the thumb up or thumb down to come 2 the review page
__________________
free web hosts
 
Reply With Quote
  #5 (permalink)  
Old 10-26-2010, 10:41 AM
clonepal's Avatar
Junior Member
 
Join Date: 10-25-10
Posts: 8
iTrader: 0 / 0%
Add this code into your .htaccess file:


# block proxy servers from site access
RewriteEngine on
RewriteCond %{HTTP:VIA} !^$ [OR]
RewriteCond %{HTTP:FORWARDED} !^$ [OR]
RewriteCond %{HTTP:USERAGENT_VIA} !^$ [OR]
RewriteCond %{HTTP:X_FORWARDED_FOR} !^$ [OR]
RewriteCond %{HTTP: PROXY_CONNECTION} !^$ [OR]
RewriteCond %{HTTP:XPROXY_CONNECTION} !^$ [OR]
RewriteCond %{HTTP:HTTP_PC_REMOTE_ADDR} !^$ [OR]
RewriteCond %{HTTP:HTTP_CLIENT_IP} !^$
RewriteRule ^(.*)$ - [F]
 
Reply With Quote
  #6 (permalink)  
Old 10-26-2010, 11:31 AM
synbitz's Avatar
Contributing Member
Latest Blog:
None

 
Join Date: 11-29-09
Location: belgium
Posts: 185
iTrader: 0 / 0%
that's old code and doesnt work on recent proxy sites like hidemyass..


ive tried that before, I can google 2 bro I wouldnt drop this question here if i hadnt of tried the google results : )

thanks anywa
__________________
free web hosts
 
Reply With Quote
  #7 (permalink)  
Old 10-26-2010, 11:53 AM
Contributing Member
Latest Blog:
None

 
Join Date: 01-16-10
Posts: 151
iTrader: 0 / 0%
I'll try it again with less technical stuff.

You're original code will only say $PROXY = true if ALL of the tests are true.
 
Reply With Quote
  #8 (permalink)  
Old 10-26-2010, 11:54 AM
clonepal's Avatar
Junior Member
 
Join Date: 10-25-10
Posts: 8
iTrader: 0 / 0%
Use this php class:

http://www.phpclasses.org/package/34...P-request.html

If you need help installing let me know.

-Alex
 
Reply With Quote
  #9 (permalink)  
Old 10-30-2010, 05:31 PM
Junior Member
 
Join Date: 10-22-09
Posts: 11
iTrader: 0 / 0%
Quote:
Originally Posted by synbitz View Post
that's old code and doesnt work on recent proxy sites like hidemyass..


ive tried that before, I can google 2 bro I wouldnt drop this question here if i hadnt of tried the google results : )

thanks anywa
Because there are so many types of proxies(HTTP, SOCKS, VPNs, Tor, etc.) it is extremely difficult to block them all.

It is a good idea to block hosting companies entirely.
 
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum

Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Free Proxy Servers The Alchemist Tech Talk 4 02-25-2010 12:34 PM
Do Google's bots crawl proxy servers? livePR.ezer.com Google Forum 5 01-31-2009 03:26 AM
blocking proxy IP's in VB Mia Tech Talk 5 10-10-2008 04:14 PM


V7N Network
Get exposure! V7N I Love Photography V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 05:27 AM.
Powered by vBulletin
Copyright 2000-2014 Jelsoft Enterprises Limited.
Copyright © 2003 - 2014 Escalate Media




Search Engine Optimization by vBSEO 3.6.0 RC 2 ©2011, Crawlability, Inc.