View Full Version : Logging IPs

01-16-2004, 09:25 PM
Is there a way to log all IPs that visit your site to, say, a text file? To test, I tried:

var IP = '<!--#echo var="REMOTE_ADDR"-->'
if ( IP == My_IP_Would_Go_Here ) { alert('Works') }
else { alert('Something is messed up') }

But neither of the alerts came up.


Roy Sinclair
01-16-2004, 09:46 PM
Sure, it's called the Web Server Log file. All of the Web Server software I've heard of offers the ability to log all requests to the server and the IP address is one of the logable items. There's also software you can buy to analyze those log files which can give you all kinds of views of how your server is performing, where on the net it's getting used the most and lots of other interesting stuff. (Google WebTrends for a look at one package).