eduard Posted November 17, 2010 Share Posted November 17, 2010 I have a website. Can I see, where the IP addresses which visited my website come from? Link to comment Share on other sites More sharing options...
Synook Posted November 18, 2010 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. Link to comment Share on other sites More sharing options...
gabrielebr Posted November 18, 2010 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 Link to comment Share on other sites More sharing options...
Synook Posted November 18, 2010 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. Link to comment Share on other sites More sharing options...
End User Posted November 18, 2010 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.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'];} Link to comment Share on other sites More sharing options...
Synook Posted November 19, 2010 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. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.