Posted: Sat Sep 07, 2002 12:13 pm Post subject: html - log every ip that entering my website?
question: how can i log every ip that entering my website? can this be done by a simple html script ??? logging i mean to write its ip on a *.txt file automatically.
Thanks.
i have not tested this....might be worth a try ! picked it up from neworder
sorry dont have full link i had several pages open and forgot the copy it
Showing the IP address to visitor of the website
If you have a site , you may wish to show the ip address of the visitors who view your webpage. To do so you may include following script in the HTML code of your webpage. This script was made available to me by my close friend and is surprisingly same as available on http://www.ankitfadia.com/ip.htm
<HTML>
<BODY>
<SCRIPT>
var ip = new java.net.InetAddress.getLocalHost();
var ipStr = new java.lang.String(ip);
document.writeln(ipStr.substring(ipStr.indexOf("/")+1));
</SCRIPT>
</body>
</HTML>
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
Featured Links*
Looking for more Windows Networking info?
Sign up to the WindowsNetworking.com Monthly Newsletter, written by Enterprise Security MVP Deb Shinder, containing news, the hottest tips, Networking links of the month and much more. Subscribe today and don't miss a thing! View a sample newsletter.
Become a WindowsNetworking.com member!
Discuss your Windows Networking issues with thousands of other Windows Newtorking experts. Click here to join!