Back to Scripts page
Click in the box below, select all and copy to grab the script
<HTML> <HEAD> <TITLE>Your IP address is</TITLE> </HEAD> <BODY BGCOLOR=WHITE> <SCRIPT LANGUAGE=JAVASCRIPT> <!-- Hide script from old browsers // This script copyright 1997, Tom Negrino and Dori Smith. // This script is from "JavaScript for the WWW, Visual QuickStart Guide, 2nd Ed." // For more information, see <http://www.chalcedony.com/javascript/>. // This script may be used and modified, but the copyright notice must remain intact. browserName = navigator.appName browserVer = parseInt(navigator.appVersion) ipAdd = "" if (browserName == "Netscape" && navigator.javaEnabled()) { if (browserVer >= 4) { ipAdd = java.net.InetAddress.getLocalHost().getHostName() } else { ipAdd = java.net.InetAddress.getLocalHostName() } } if (ipAdd != "") { document.writeln("<H1>Your IP address is: " + ipAdd + ".</H1>") if (ipAdd.substring(0,7) == "17.254.") { document.write("<H2>Welcome, visitor from Apple!</H2>") } } // End hiding script from old browsers --> </SCRIPT> </BODY> </HTML>