Using this tool on your web pages

To display the user's IP address on your webbie, whether it is a blog, forum or anything that goes through the browser and is human-readable, and as long my server doesn't doze off, this idiot-proof method will work 95.51% of the time. (The other 4.49% of the time users don't have JavaScript 1.2+ enabled on a web page - as of Nov 2006.)

Step 1 (also the final step):

Paste the following code onto where you want it to appear in the page:

<script src="http://latecomerx.com/labs/ip/javascript.php" type="text/javascript"></script><noscript>JavaScript Required</noscript>

There's nothing much to edit, except for the text that is displayed when JavaScript is disabled on the page where the script is on. It should be quite of common sense to edit it - just spend a few seconds reading the code. If you don't wish anything to appear when JavaScript is disabled, you can just delete the pair of <noscript> tags altogether.

So, for example, if I just need a simple 'Your IP Address is' message, I will use the following code:

Your IP Address is: <script src="http://latecomerx.com/labs/ip/javascript.php" type="text/javascript"></script><noscript>JavaScript Required</noscript>

And it will look like something like this:

Your IP Address is:

I personally don't think putting this on web pages is very useful, I mean, who needs to know their IP address when they are surfing the web? But anyway, if you need it, just use it. Really. =P


Back to main page