Results 1 to 3 of 3

Thread: detect proxy server with PHP?

  1. #1
    Join Date
    Jul 2008
    Location
    Mexico
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default detect proxy server with PHP?

    Does anyone know of a way to detect if the user is coming in via a proxy server using PHP?

    Omar Bacha

  2. #2
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    Probably the best way that I could think of off the top of my head would be to use $_SERVER['HTTP_X_FORWARDED_FOR']. That usually gives you the local IP address of the user if it is behing a proxy.

    Hope this helps.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  3. #3
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    If the proxy is good enough, you can't tell, in the end.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

Bookmarks

Posting Permissions

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