eduard 37 Posted November 17, 2010 Report Share Posted November 17, 2010 I have a website. Can I see, where the IP addresses which visited my website come from? Quote Link to post Share on other sites
Synook 47 Posted November 18, 2010 Report Share Posted November 18, 2010 Yes - the way you access it depends on what language you are using. With PHP, for example, you can use the $_SERVER['REMOTE_ADDR'] index. Quote Link to post Share on other sites
gabrielebr 0 Posted November 18, 2010 Report Share Posted November 18, 2010 I have a website. Can I see, where the IP addresses which visited my website come from?If you bought a web space to publish your site (if it is not a free web space), normally you have a statistics utility that let you check the number of visits to your web site. The statistic contains a lot of details including the IP address of the visitors.Perhaps you can ask your web space supplier how you can access the statistics file.regardsgabriele Quote Link to post Share on other sites
Synook 47 Posted November 18, 2010 Report Share Posted November 18, 2010 If you are looking for statistics, you can also use a third-party analytics packages such as Mint or Google Analytics. Quote Link to post Share on other sites
End User 0 Posted November 18, 2010 Report Share Posted November 18, 2010 (edited) Yes - the way you access it depends on what language you are using. With PHP, for example, you can use the $_SERVER['REMOTE_ADDR'] index.This will return some valid IPs, but if they're using a proxy or other forwarding mechanism you may want to go with something like this:// try and get the real IP address...if (getenv('HTTP_CLIENT_IP')) { $ip_address = getenv('HTTP_CLIENT_IP');}elseif (getenv('HTTP_X_FORWARDED_FOR')) { $ip_address = getenv('HTTP_X_FORWARDED_FOR');}elseif (getenv('HTTP_X_FORWARDED')) { $ip_address = getenv('HTTP_X_FORWARDED');}elseif (getenv('HTTP_FORWARDED_FOR')) { $ip_address = getenv('HTTP_FORWARDED_FOR');}elseif (getenv('HTTP_FORWARDED')) { $ip_address = getenv('HTTP_FORWARDED');}else { $ip_address = $_SERVER['REMOTE_ADDR'];} Edited November 18, 2010 by End User Quote Link to post Share on other sites
Synook 47 Posted November 19, 2010 Report Share Posted November 19, 2010 Heh - well, it all depends on what IP you're trying to get, exactly. Also, proxies don't have to send those headers. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.