Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Feb 2010
    Posts
    17
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Allowing "approved" proxy's

    Hey gang,
    I'm currently using the following code to prevent people behind proxies from accessing my site.
    PHP Code:
    if( @fsockopen$_SERVER['REMOTE_ADDR'], 80$errstr$errno) )
    {
        die(
    "You cannot use a proxy to enter this site. So please don't TRY! ");

    The problem I'm now having is, proxies are becoming more and more common in work places (not just for hackers anymore LOL).
    I would like to allow certain proxy IP's to be approved. Is this possible??

    Thanks
    Les-

  • #2
    New Coder
    Join Date
    Feb 2010
    Posts
    17
    Thanks
    4
    Thanked 0 Times in 0 Posts
    bump
    anyone able to help me??

  • #3
    New Coder
    Join Date
    Feb 2010
    Posts
    17
    Thanks
    4
    Thanked 0 Times in 0 Posts
    197 views and no one can help me...

    I know there's someone out there that has an answer
    PLEEEEAAAASSSSE

  • #4
    New Coder
    Join Date
    Mar 2010
    Posts
    19
    Thanks
    0
    Thanked 1 Time in 1 Post
    Quote Originally Posted by lesliegy View Post
    197 views and no one can help me...

    I know there's someone out there that has an answer
    PLEEEEAAAASSSSE
    What you think about this?

    PHP Code:

    if( @fsockopen$_SERVER['REMOTE_ADDR'], 80$errstr$errno) )
    {
        
    $con mysql_connect("localhost","peter","abc123");
        if (!
    $con){
            die(
    'Could not connect: ' mysql_error());
        }
        
    mysql_select_db("my_db"$con);

        
    $result mysql_query("SELECT white_list_proxy_id FROM proxys WHERE `ip` = '".$_SERVER['REMOTE_ADDR']."' ");
        
    $white_ip $result['white_list_proxy_id'];
        
    mysql_close($con);

        
    $if $white_ip == "") {
            die(
    "You cannot use a proxy to enter this site. So please don't TRY! ");
        }

    Than u could work on a nice admin page to add white listed proxys :]
    Last edited by TripBR; 03-31-2010 at 06:52 PM. Reason: Code bugs xD

  • Users who have thanked TripBR for this post:

    lesliegy (04-02-2010)

  • #5
    New Coder
    Join Date
    Feb 2010
    Posts
    17
    Thanks
    4
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by TripBR View Post
    What you think about this?

    PHP Code:

    if( @fsockopen$_SERVER['REMOTE_ADDR'], 80$errstr$errno) )
    {
        
    $con mysql_connect("localhost","peter","abc123");
        if (!
    $con){
            die(
    'Could not connect: ' mysql_error());
        }
        
    mysql_select_db("my_db"$con);

        
    $result mysql_query("SELECT white_list_proxy_id FROM proxys WHERE `ip` = '".$_SERVER['REMOTE_ADDR']."' ");
        
    $white_ip $result['white_list_proxy_id'];
        
    mysql_close($con);

        
    $if $white_ip == "") {
            die(
    "You cannot use a proxy to enter this site. So please don't TRY! ");
        }

    Than u could work on a nice admin page to add white listed proxys :]
    YES!!!!
    Thanks so much, this is what I was looking for... now I have the starting point I so badly needed.

    This site rocks!


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •