Preview

Get Client's IP Address using JSON or Javascript

l2.io

l2.io is based in , according to alexa, l2.io doesn't have a global rank
Open This Website

Hosted In:

Safety:

Domain Extension:

.io

IP address:

195.80.159.133

Meta Data Analysis

Description
Get Client's IP Address using JSON or Javascript
h1 tags

2.800.000.000 requests in the last 24 hours Obtaining Visitor's IP Address using JSON This basic API permits you to get the public IP address of the system making the call. The function returns a JSON Text String with the IP address of the caller in either IPv4 or IPv6 format, depending on the requester's protocol. Syntax : https://l2.io/ip.json Try it! Get JSON User's IP address IPv4 32-bit (four-byte) format, e.g. 195.80.156.70 IPv6 128-bit format, e.g. 2a00:1b11:115:102:195:80:156:70 If your script only supports IPv4 answers, you may want to use the following call to force IPv4: Syntax : https://www.l2.io/ip.json Try it! Get JSON User's IP address IPv4 32-bit (four-byte) format, e.g. 195.80.156.70 #curl https://l2.io/ip.json {"ip":"195.80.156.70"} #curl https://l2.io/ip.json?var=myip {"myip":"195.80.156.70"} Obtaining Visitor's IP Address in Javascript This API permits you to set the Javascript Variable of your choice with the public IP address of the system making the call. The call returns a piece of Javascript Code with the IP address of the caller in either IPv4 or IPv6 format, depending on your request's protocol. The Variable Name is defined through the 'var' parameter. Syntax : Set javascript variable "myip" to client's IP address IPv4 32-bit (four-byte) format, e.g. myip = "195.80.156.70"; IPv6 128-bit format, e.g. myip = "2a00:1b11:115:102:195:80:156:70"; If your script only supports IPv4 answers, you may want to use the following call instead : Syntax : Set javascript variable "myip" to client's IP address IPv4 32-bit (four-byte) format, e.g. myip = "195.80.156.70"; The following lines could be inserted into your HTML page.   var userip; ... ...   document.write("Your IP is :", userip); Syntax : Display Client's IP address in your HTML page using javascript --> document.write('x.x.x.x'); Get IP Address with a simple HTTP(s) request This basic API permits you to get the public IP address of the system making the call. The function returns a Text String with the IP address of the caller in either IPv4 or IPv6 format, depending on your request's protocol. Syntax : https://l2.io/ip Try it! Diplay/Get Plain Text User's IP address IPv4 32-bit (four-byte) format, e.g. 195.80.156.70 IPv6 128-bit format, e.g. 2a00:1b11:115:102:195:80:156:70 If your script only supports IPv4 answers, you may want to use the following call to force IPv4: Syntax : https://www.l2.io/ip Try it! Diplay/Get Plain Text User's IP address IPv4 32-bit (four-byte) format, e.g. 195.80.156.70 The following examples show how you can use this API from various language. #shellperlpythonvb.net #!/bin/sh #Simple request using curl from a shell script. #If your OS supports a dual stack IPv4/IPv6 you can add -4 or -6 option #to force protocol selection, e.g. $(curl -4 -s https://l2.io/ip). myip=$(curl -s https://l2.io/ip) echo "My IP is $myip" #!/usr/bin/perl #Debian library : apt-get install libwww-perl use LWP::UserAgent; my $useragent = new LWP::UserAgent(); my $myip = $useragent->get('https://l2.io/ip')->content; print 'My IP address is: '. $myip; #!/usr/bin/env python #Debian library : apt-get install python-requests from requests import get myip = get('https://l2.io/ip').text print 'My IP address is: ', myip Dim wc as New System.Net.WebClient Dim myip as String = wc.DownloadString("https://l2.io/ip") MessageBox.Show(myip)
h2 tags

Obtaining Visitor's IP Address using JSON
Obtaining Visitor's IP Address in Javascript
Get IP Address with a simple HTTP(s) request
Site Speed
0.19370985031128

Rankings

Alexa Rank:

0

Site's Traffic

alexa rank

DNS Analysis

Host Type Class TTL Target
l2.ioSOAIN3600
l2.ioNSIN21600ns2.decknet.com
l2.ioNSIN21600ns1.decknet.com
l2.ioMXIN21600mx2.decknet.net
l2.ioAIN21600

Similar