info about me. elkboy: info
BackForwardhomeForumLinksGuidefanficMiscComputersMascotsNorskDeutschFrancaise
Browser Sniffing

Sometimes, you want to know things about your browser. For instance, the IP address. Or it could be that you just want to give the visitors of your website that 1984-feeling of surveillance. Either way, it's pretty easy to do.



Date: Thursday, 20-Nov-2008 14:24:54 CET
IP: 38.103.63.62

This little snipplet of Javascript and SSI code will produce the results we're talking about, which is the same code I used on my splash screen.


<script language="JavaScript">
<!--
document.write("Operating System: "+navigator.platform+"<br>");
document.write("Colour Depth: "+window.screen.colorDepth + " bits<br>");
document.write("Screen Size: "+window.screen.width + " x " + window.screen.height+"<br>");
document.write("Browser: "+navigator.appName + " " + navigator.appVersion);
// --></script><br>
Date: <!--#echo var="DATE_LOCAL" --><br>
IP: <!--#echo var="REMOTE_ADDR" --><br>