Page 1 of 1
Show local ip of visitor
Posted: Tue Jan 03, 2006 8:38 am
by tOKmaZ
Hi,
I wonder if there is any method to use that will show a visitor's local ip-address?
Thomas
Posted: Tue Jan 03, 2006 8:50 am
by Chris Corbyn
You can view the external IP address they used to access your site but it may be a proxy server at the end of the day.
As for getting their internal IP on an intranet you can't do it for security reasons... that information isn;t sent over HTTP

Posted: Tue Jan 03, 2006 8:51 am
by Charles256
that and to top it off if you start echoing peolpe's IP address on your webpage you might freak someone out.heh..though..that could be a good reason to do it....
Posted: Tue Jan 03, 2006 9:07 am
by hawleyjr
I'm not sure if echoing out peoples IP addresses will really freak anyone out. I think anyone who knows what an IP address is will also know that servers can see your IP address.
Posted: Tue Jan 03, 2006 9:10 am
by Charles256
true,but not every joe smo knows things about IP addresses

It depends on who his auideince is..
Posted: Tue Jan 03, 2006 11:12 am
by tOKmaZ
As for getting their internal IP on an intranet you can't do it for security reasons... that information isn;t sent over HTTP Smile
This is what I thought.. anyways, I wasn't going to echo it, but using it for detecting if my webpage were accessed by me (from my home computer, which also is my webserver) or someone else.
Posted: Tue Jan 03, 2006 11:16 am
by Maugrim_The_Reaper
Seems reasonable - your IP may even be the normal localhost (127.0.0.1) so its easily detected if that's the case. Just keep in mind (for any other possible future reasons) that IP is not a unique identifier as commonly believed. It should work for local access from your home PC to a webserver on that same PC. If you are redirecting through your ISP (not
http://localhost/) keep in mind you may not have a fixed IP yourself...
Posted: Tue Jan 03, 2006 11:21 am
by TS_Death_Angel
Isn't JavaScript able to show your local IP adress?
Posted: Tue Jan 03, 2006 11:45 am
by Maugrim_The_Reaper
For the user using the browser maybe - not a clue to be honest. But for a server to know every visitors IP it needs the REMOTE_ADDR $_SERVER variable...
Posted: Tue Jan 03, 2006 1:55 pm
by feyd
Javascript does not have access to IP information.