1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Block/prevent users with proxies?

Discussion in 'Blogging' started by Husbarn, Sep 10, 2014.

  1. Husbarn

    Husbarn Junior Member

    Joined:
    Dec 19, 2012
    Messages:
    160
    Likes Received:
    20
    Is there an easy way how I could prevent/block a user if a user uses proxy?

    I don't want people with proxies to access my site. How I can do it?
     
  2. dannyvriens

    dannyvriens Registered Member

    Joined:
    Apr 3, 2010
    Messages:
    91
    Likes Received:
    32
    If you know a little bit php you can make a blocker very easy, here is a basic example

    PHP:
    if (
          
    $_SERVER['HTTP_X_FORWARDED_FOR']
       || 
    $_SERVER['HTTP_X_FORWARDED']
       || 
    $_SERVER['HTTP_FORWARDED_FOR']
       || 
    $_SERVER['HTTP_CLIENT_IP']
       || 
    $_SERVER['HTTP_VIA']
       || 
    in_array($_SERVER['REMOTE_PORT'], array(8080,80,6588,8000,3128,553,554))
       || @
    fsockopen($_SERVER['REMOTE_ADDR'], 80$errno$errstr30)){    exit('Proxy detected');}
     
  3. myinternetempire

    myinternetempire Jr. VIP Jr. VIP

    Joined:
    Oct 24, 2011
    Messages:
    775
    Likes Received:
    139
    Occupation:
    Internet Marketing | Software Development
    Location:
    Orlando, Florida
    Home Page:
    With PHP coding you can easily prevent users with proxies. I think you already got a coding on how to block users with proxies.
     
  4. WMAid

    WMAid Newbie

    Joined:
    Sep 9, 2014
    Messages:
    45
    Likes Received:
    2
    Home Page:
    this code may help you to detect only free public proxies.
     
  5. supacatt

    supacatt Junior Member

    Joined:
    Mar 21, 2009
    Messages:
    111
    Likes Received:
    4
    Occupation:
    Internet Marketer
    Location:
    Hollywood, Florida
    Would that code work with anonymous proxies that are not public?