How to Stop Proxy User

Discussion in 'PHP' started by joe_mat, Mar 7, 2008.

  1. #1
    Hello,


    I am having a shopping cart application on my website. i want if some is opening my website from proxy server and click on check out button, then i should have some script that will check that is this click is from direct browser not from proxy.

    E:g if i have hidden value in checkout for like :

    <INPUT type=hidden value="$CurrentPageURL" ="CartcheckoutPath">

    and on next page or on same page i can cross check it. so that the proxy user cannot move further to next page.

    Can you please suggest how is it possible.

    Please suggest.

    Thanks
     
    joe_mat, Mar 7, 2008 IP
  2. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #2
    First off, why do you want to do this? Some people use proxies, 'cause it makes them feel more secure. And others might use proxies because of their ISP. So why not give these users a chance to checkout?

    Anyway, this will detect most proxies. BUT IT'LL ALSO BLOCK SOME NON-PROXY USERS.
    
    if (@fsockopen($_SERVER['REMOTE_ADDR'], 80))
    {
        // Is proxy... handle error
    }
    
    PHP:
    Other than that, I don't think there's a real way to detect a proxy...
     
    nico_swd, Mar 8, 2008 IP
  3. proxywhereabouts

    proxywhereabouts Notable Member

    Messages:
    4,027
    Likes Received:
    110
    Best Answers:
    0
    Trophy Points:
    200
  4. jonimontana

    jonimontana Well-Known Member

    Messages:
    262
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    108
    #4
    jonimontana, Mar 8, 2008 IP