Joined: 15 May 2004 Posts: 8748 Location: Castle Pines North, CO USA
Posted: Wed Sep 14, 2005 3:23 pm
You will need to use a server side language (ASP, PHP, .NET) actually.
You could use JavaScript, but not reliable
Code:
<SCRIPT LANGUAGE="Javascript">
window.onerror=null;
myAddress=java.net.InetAddress.getLocalHost();
myAddress2=java.net.InetAddress.getLocalHost();
host=myAddress.getHostName();
ip=myAddress2.getHostAddress();
alert("hi there "+ namePrompt +" you ip adress is " +ip);
</SCRIPT>
Code:
<SCRIPT LANGUAGE="Javascript">
if (navigator.appName=='Netscape' && navigator.javaEnabled()) {
window.onerror=null;
myAddress=java.net.InetAddress.getLocalHost();
myAddress2=java.net.InetAddress.getLocalHost();
host=myAddress.getHostName();
ip=myAddress2.getHostAddress();
document.write("hi there "+ prompt('Your name?') +" you ip adress is " +ip);
}
</SCRIPT>
Thanks "Corey Bryant" for sharing us JavaScript but I am looking for script which also mention user location (country or city) where the users come from.
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