Show local ip of visitor
Moderator: General Moderators
Show local ip of visitor
Hi,
I wonder if there is any method to use that will show a visitor's local ip-address?
Thomas
I wonder if there is any method to use that will show a visitor's local ip-address?
Thomas
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
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 
Code: Select all
echo $_SERVER['REMOTE_ADDR'];-
Charles256
- DevNet Resident
- Posts: 1375
- Joined: Fri Sep 16, 2005 9:06 pm
-
Charles256
- DevNet Resident
- Posts: 1375
- Joined: Fri Sep 16, 2005 9:06 pm
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.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
- Maugrim_The_Reaper
- DevNet Master
- Posts: 2704
- Joined: Tue Nov 02, 2004 5:43 am
- Location: Ireland
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...
-
TS_Death_Angel
- Forum Commoner
- Posts: 31
- Joined: Sat Dec 31, 2005 8:49 am
- Maugrim_The_Reaper
- DevNet Master
- Posts: 2704
- Joined: Tue Nov 02, 2004 5:43 am
- Location: Ireland