Show Your Blogger Visitors Their IP Address on Your Blog

Show visitors their IP Address on your Blogger
A free and simple JavaScript code to tell your visitors what their IP addresses and Host names are. The information is displayed to the users at your desired location on your Web pages.
Before i proceed to the tutorial, i would like to explain the types of IP addresses this will help you to understand it better. There are two types of IP addresses IPv4 and IPv6.

IPv4 stands for Internet Protocol version 4. It is the original standard set up for handling IP addresses when the Internet was initial developed by DARPA (Defense Advanced Research Projects Agency) in the early 1970s.
IPv4 is the underlying technology that makes it possible for us to connect our devices to the web. Whenever a device access the Internet (whether it's a PC, Mac, smartphone or other device), it is assigned a unique, numerical IP address such as 99.48.227.227. To send data from one computer to another through the web, a data packet must be transferred across the network containing the IP addresses of both devices.

Without IP addresses, computers would not be able to communicate and send data to each other. It's essential to the infrastructure of the web.

IPv4 addresses are all but consumed By 1992, the rapid explosion of the Internet fueled by the vast number of personal computers attaching to it, made it clear that the IPv4 address space was already consumed to the point that a replacement had to be found.

IPv6 was developed in response to this situation. IPv6 allocates 128 bits to map the Internet address space. The number of bits were not just doubled, but instead quadrupled from IPv4's 32 bits to insure that this address space would not run out any timesoon!

IPv6 is the sixth revision to the Internet Protocol and the successor to IPv4. It functions similarly to IPv4 in that it provides the unique, numerical IP addresses necessary for Internet-enabled devices to communicate.

IPv6 addresses will probably never run out 128 address bits provide IPv6 with 340,282,366,920,938,463,463,374,607,431,768,211,456 unique addresses. It may seem like overkill to have this many addresses available, However, many visionary individuals believe that eventually every wired and wireless computer, cell phone, PDA, household appliance, security camera,devices that haven't yet been invented, will each have their own unique Internet address.
Besides the huge number of IP addresses, IPv6 provides for better handling of voice than IPv4 which was not initially set up to handle it. This means that phone conversations over the Internet will be smooth and clear instead of choppy and broken up like they often are now.
The time is almost upon us when any device with an Internet address and a connection to the Internet can be monitored and controlled from anywhere in the world. While you're away on vacation you could turn on lights, change your thermostat, checksecurity cameras around your home, etc. The possibilities are only limited by our imagination.

  • The client IP address is stored in variable "VIH_HostIP". The client host name, if available, is stored in variable "VIH_HostName". You can use these variables in your own JavaScript code, if desired.
  • You can omit the "VIH_BackColor", "VIH_ForeColor", "VIH_FontPix", "VIH_DisplayFormat", and "VIH_DisplayOnPage" parameters. Default values will be used in that case.
  • "VIH_DisplayFormat" allows you to format the display to your liking. For example, instead of the default English, you can use terms from your own language, or make any other desired adjustments, like omitting the IP address.
  • If "VIH_DisplayOnPage" is set to "no", client information will not be printed. This option is useful if you want to use your own JavaScript code utilizing the "VIH_HostIP" and/or "VIH_HostName" variables.

1. Go to your blogger Dashboard
2. Click on Layouts
3. Click Add a Gadget and select HTML/JavaScript
4. Copy and paste the simple JavaScript code and and finally click save button. 

Now your Blogger is ready to display your readers IP Address on your blog.

Here's the simple JavaScript code:



<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>
<script language="JavaScript" src="//scripts.hashemian.com/js/visitorIPHOST.js.php"></script>
Subcribe to Our Newsletter For Free

Subscribe Now

Recommended For You

Speak Your Mind