|
-
Dec 3rd, 2005, 10:47 AM
#1
Thread Starter
Fanatic Member
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.
-
Dec 3rd, 2005, 04:24 PM
#2
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.
-
Dec 3rd, 2005, 08:20 PM
#3
Fanatic Member
Re: Correct Ip address
 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?
-
Dec 3rd, 2005, 10:59 PM
#4
PowerPoster
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. :\
-
Dec 4th, 2005, 04:22 AM
#5
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?
-
Dec 4th, 2005, 04:31 AM
#6
PowerPoster
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.
-
Dec 4th, 2005, 04:39 AM
#7
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.
-
Dec 4th, 2005, 04:45 AM
#8
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.
-
Dec 4th, 2005, 03:37 PM
#9
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|