Skip to content

Implementing in PHP

Dr. Simon Antony Roberts edited this page Feb 24, 2018 · 1 revision

Raw Output Implementation

The following code implements the raw.api call for strata importing the implemented array:

$gtld = eval("?>".file_get_contents("http://whois.localhost/v2/snails.email/raw.api")."<?php");

The following code implements the raw.api call for fallout importing the implemented array:

$ipv4 = eval("?>".file_get_contents("http://whois.localhost/v2/125.23.45.111/raw.api")."<?php");

The following code implements the raw.api call for fallout importing the implemented array:

$ipv6 = eval("?>".file_get_contents("http://whois.localhost/v2/2001:0:9d38:953c:1052:39d8:8355:2880/raw.api")."<?php");

JSON Output Implementation

The following code implements the json.api call for strata importing the implemented array:

$gtld = json_decode(file_get_contents("http://whois.localhost/v2/snails.email/json.api"), true);

The following code implements the json.api call for fallout importing the implemented array:

$ipv4 = json_decode(file_get_contents("http://whois.localhost/v2/125.23.45.111/json.api"), true);

The following code implements the json.api call for fallout importing the implemented array:

$ipv6 = json_decode(file_get_contents("http://whois.localhost/v2/2001:0:9d38:953c:1052:39d8:8355:2880/json.api"), true);

SERIAL Output Implementation

The following code implements the serial.api call for strata importing the implemented array:

$gtld = unserialize(file_get_contents("http://whois.localhost/v2/snails.email/serial.api"));

The following code implements the serial.api call for fallout importing the implemented array:

$ipv4 = unserialize(file_get_contents("http://whois.localhost/v2/125.23.45.111/serial.api"));

The following code implements the serial.api call for fallout importing the implemented array:

$ipv6 = unserialize(file_get_contents("http://whois.localhost/v2/2001:0:9d38:953c:1052:39d8:8355:2880/serial.api"));

XML Output Implementation

The following code implements the xml.api call for strata importing the implemented array:

$gtld = new SimpleXMLElement(file_get_contents("http://whois.localhost/v2/snails.email/xml.api"));

The following code implements the xml.api call for fallout importing the implemented array:

$ipv4 = new SimpleXMLElement(file_get_contents("http://whois.localhost/v2/125.23.45.111/xml.api"));

The following code implements the xml.api call for fallout importing the implemented array:

$ipv6 = new SimpleXMLElement(file_get_contents("http://whois.localhost/v2/2001:0:9d38:953c:1052:39d8:8355:2880/xml.api"));