L2.IO

Get Client IP Address from Javascript


NEWS

2014-10-20: We have now reach
300.000 Hits per Day !

COMMING SOON

HTTPS for Secured Site integration

UNDER DEVELOPMENT

A new Variable for User Agent
A new Variable for Country Code
A new Variable for Country Name
Syntax : <script type="text/javascript" src="http://l2.io/ip.js?var=myip"></script>
Set javascript variable "myip" to client IP address
--> myip = "x.x.x.x";
<script type="text/javascript">
  var userip;
</script>
...
<script type="text/javascript" src="http://l2.io/ip.js?var=userip"></script>
...
<script type="text/javascript">
  document.write("Your IP is :", userip);
</script>
Syntax : http://l2.io/ip
Diplay Client IP address
--> x.x.x.x
Syntax : <script type="text/javascript" src="http://l2.io/ip.js"></script>
Display Client IP address in your HTML page using javascript
--> document.write('x.x.x.x');