Help

Below are code samples for various languages that download the JSON from this page. You should be able to copy/paste your desired code snippet into your project.

PHP

$url = "http://ip.nextfridayit.com/json";
$json = file_get_contents($url); 
$obj = json_decode($json); 

//Your information 
//You can echo or print any of these variables 
$ip_address = $obj->{'Remote Address'};
$hostname = $obj->{'Remote Host'};
$port = $obj->{'Remote Port'};
$referrer = $obj->{'Referrer'};
$user_agent = $obj->{'User Agent'};

Powershell 3

$request = 'http://ip.nextfridayit.com/json'
$result = Invoke-RestMethod -uri $request -Method Get

#Your information
#You can write-host any of these variables.
$ip_address = $result.'Remote Address'
$hostname = $result.'Remote Host'
$port = $result.'Remote Port'
$referrer = $result.Referrer
$user_agent = $result.'User Agent'

Powershell 1 & 2

$request = 'http://ip.nextfridayit.com/json'
$result = Invoke-WebRequest $request | ConvertFrom-Json

#Your information
#You can write-host any of these variables.
$ip_address = $result.'Remote Address'
$hostname = $result.'Remote Host'
$port = $result.'Remote Port'
$referrer = $result.Referrer
$user_agent = $result.'User Agent'

Python 3

import urllib.request, json
with urllib.request.urlopen("http://ip.nextfridayit.com/json") as url:
    data = json.loads(url.read().decode())


#Your information
#You can print() out any of these variables.
ip_address = data['Remote Address']
hostname = data['Remote Host']
port = data['Remote Port']
referrer = data['Referrer']
user_agent = data['User Agent']

Python 2

import urllib, json
url = "http://ip.nextfridayit.com/json"
response = urllib.urlopen(url)
data = json.loads(response.read())

#Your information
#You can print out any of these variables.
ip_address = data['Remote Address']
hostname = data['Remote Host']
port = data['Remote Port']
referrer = data['Referrer']
user_agent = data['User Agent']