Click to See Complete Forum and Search --> : Correct Ip address
vbPoet
Dec 3rd, 2005, 09:47 AM
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.
visualAd
Dec 3rd, 2005, 03:24 PM
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.
k1ll3rdr4g0n
Dec 3rd, 2005, 07:20 PM
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?
Pc_Madness
Dec 3rd, 2005, 09:59 PM
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. :\
visualAd
Dec 4th, 2005, 03:22 AM
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?
Pc_Madness
Dec 4th, 2005, 03:31 AM
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. :p
CornedBee
Dec 4th, 2005, 03:39 AM
This is the test my brother came up with (or read somewhere) ages ago, and it's always worked correctly, assuming a proper proxy:
return isset($_SERVER['HTTP_X_FORWARDED_FOR']) ?
$_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR'];
visualAd
Dec 4th, 2005, 03:45 AM
These scripts could be using the X-HTTP-FORWARDED-FOR header sent by the proxy server. They may also be using Java (http://www.rgagnon.com/jsdetails/js-0019.html), 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 (http://phpbuilder.com/board/showthread.php?t=10313544), they know way more about PHP than I do so if indeed there is a way using PHP they'll know.
CornedBee
Dec 4th, 2005, 02:37 PM
If the proxy decides not to forward the client's IP, there nothing you can do save locking the user out.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.