PHP Code to Get Visitors IP Address

NOTE TO READERS: If you are reading a tutorial post, carefully read each and every instructions to avoid errors.

Get this useful PHP code to retrieve your visitor’s IP address. This code basically does is displaying the visitors IP address on the screen together with it’s hostname

PHP Code to Get IP Address

Make sure you put this code on a .php file or if you know how to integrate php in html you may as well.


<script language=”JavaScript”>
VIH_BackColor = “palegreen”;
VIH_ForeColor = “navy”;
VIH_FontPix = “16”;
VIH_DisplayFormat = “You are visiting from:<br>IP Address: %%IP%%<br>Host: %%HOST%%”;
VIH_DisplayOnPage = “yes”;
<script language=”JavaScript” src=””></script>

You might also like:

And here is the Demo

View Demo

Credits to

Incoming search terms:

  • hack mobile with php code

DISCLAIMER: has no way associated on all external links from this post.

How to Complete the Verification Test and Simple Errors Click Here

Featured Content...

See also:

Leave a Reply

Your email address will not be published. Required fields are marked *