Results 1 to 9 of 9

Thread: Correct Ip address

  1. #1

    Thread Starter
    Fanatic Member vbPoet's Avatar
    Join Date
    Feb 2005
    Location
    Searching ..
    Posts
    669

    Correct Ip address

    I have seen some websites just detect my proxy address but some scripts are really wise and they can detect my real ip address.
    I just want to know what are their differences and how can i build for detecting real ip address.

  2. #2
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: Correct Ip address

    A PHP script would have knowledge of only the computer which made the request and its IP address. To obtain an IP address of the original host, you would need to run some kind of script or executable on that machine.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  3. #3
    Fanatic Member
    Join Date
    Oct 2004
    Posts
    751

    Re: Correct Ip address

    Quote Originally Posted by visualAd
    A PHP script would have knowledge of only the computer which made the request and its IP address. To obtain an IP address of the original host, you would need to run some kind of script or executable on that machine.
    No, I have seen websites before (with firefox) where they can see past a proxy server (without having to run a executable on that computer). How they do this, I don't know. But I have only seen like 2 sites in my whole life that have that.

    Can you detect IP address with javascript?
    My Projects: [ Instant Messagener Client/Server ] [ VBPictochat ]

    My Sites:
    [ Datanethost ]
    [ Helpdesk ]

    Remember if my post was helpful then Rate This Post.

  4. #4
    PowerPoster Pc_Madness's Avatar
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    2,765

    Re: Correct Ip address

    Yeah I've seen it done as well with PHP scripts, but I don't believe it can be done from inside a single php function or whatever. :\
    Don't Rate my posts.

  5. #5
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: Correct Ip address

    Interesting - I'll see what I can dig up. Maybe the proxy server sends some kind of header with it in. Anyone got a linkto one of these sites?
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  6. #6
    PowerPoster Pc_Madness's Avatar
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    2,765

    Re: Correct Ip address

    From PHP.com/getenv
    I am about to try and nut this out but from the data I see so far the true ip address (live ip of the nat router) is included in $_SERVER['HTTP_CACHE_CONTROL'] as bypass-client=xx.xx.xx.xx

    $_SERVER['HTTP_X_FORWARDED_FOR'] contains the proxy behind the nat router.

    $_SERVER['REMOTE_ADDR'] is the isp proxy (from what I read this can be a list of proxies if you go through more than one)
    Any truth to that do you think? Can't be bothered to setup a test myself.
    Don't Rate my posts.

  7. #7
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594

    Re: Correct Ip address

    This is the test my brother came up with (or read somewhere) ages ago, and it's always worked correctly, assuming a proper proxy:
    Code:
    return isset($_SERVER['HTTP_X_FORWARDED_FOR']) ?
    	$_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR'];
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  8. #8
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: Correct Ip address

    These scripts could be using the X-HTTP-FORWARDED-FOR header sent by the proxy server. They may also be using Java, again , this seems to rely on the proxy telling you that the IP address and in my case only ever return 127.0.0.1 as my proxy server is set not to expose the clients IP.

    I posted a script on PHP Builder, they know way more about PHP than I do so if indeed there is a way using PHP they'll know.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  9. #9
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594

    Re: Correct Ip address

    If the proxy decides not to forward the client's IP, there nothing you can do save locking the user out.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

Posting Permissions

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



Click Here to Expand Forum to Full Width