Finding a user's IPAddress. This works in the Netscape browser ONLY !!!
function getIPAddress ()
{
browserVersion = parseInt(navigator.appVersion);
ipAdd = "";
if (isNS4)
{
if (navigator)
{
if (navigator.javaEnabled())
{
ipAdd = java.net.InetAddress.getLocalHost();
ipName = java.net.InetAddress.getLocalHost().getHostName();
}
}
}
if (ipAdd != "")
{
document.writeln ("<H2>Your IP Address is " + ipAdd + ".</H2>");
if (ipAdd.substring(0,7) == "17.254.")
{
document.write("<H3>Welcome, visitor from Apple!</H3>");
}
}
}