From: <chr...@us...> - 2018-02-24 13:38:15
|
Revision: 13344 http://sourceforge.net/p/xoops/svn/13344 Author: chronolabscoop Date: 2018-02-24 13:38:12 +0000 (Sat, 24 Feb 2018) Log Message: ----------- WhoIS REST API v2.3.0! Modified Paths: -------------- *.xoops.org (Subdomain APIs & Sites)/strata.xoops.org/README.md *.xoops.org (Subdomain APIs & Sites)/whois.xoops.org/README.md *.xoops.org (Subdomain APIs & Sites)/whois.xoops.org/class/whois.php *.xoops.org (Subdomain APIs & Sites)/whois.xoops.org/include/version.php Modified: *.xoops.org (Subdomain APIs & Sites)/strata.xoops.org/README.md =================================================================== --- *.xoops.org (Subdomain APIs & Sites)/strata.xoops.org/README.md 2018-02-23 10:45:37 UTC (rev 13343) +++ *.xoops.org (Subdomain APIs & Sites)/strata.xoops.org/README.md 2018-02-24 13:38:12 UTC (rev 13344) @@ -43,3 +43,47 @@ ##Licensing * This is released under General Public License 3 - GPL3 - Only! + +# Implementing in PHP + +The following examples is how to implement this API in PHP + +## Raw Output Implementation + +The following code implements the _raw.api_ call for strata importing the implemented array: + + $strata = eval("?>".file_get_contents("http://strata.localhost/v2/strata/raw.api")."<?php"); + +The following code implements the _raw.api_ call for fallout importing the implemented array: + + $fallout = eval("?>".file_get_contents("http://strata.localhost/v2/fallout/raw.api")."<?php"); + +## JSON Output Implementation + +The following code implements the _json.api_ call for strata importing the implemented array: + + $strata = json_decode(file_get_contents("http://strata.localhost/v2/strata/json.api"), true); + +The following code implements the _json.api_ call for fallout importing the implemented array: + + $fallout = json_decode(file_get_contents("http://strata.localhost/v2/fallout/json.api"), true); + +## SERIAL Output Implementation + +The following code implements the _serial.api_ call for strata importing the implemented array: + + $strata = unserialize(file_get_contents("http://strata.localhost/v2/strata/serial.api")); + +The following code implements the _serial.api_ call for fallout importing the implemented array: + + $fallout = unserialize(file_get_contents("http://strata.localhost/v2/fallout/serial.api")); + +## XML Output Implementation + +The following code implements the _xml.api_ call for strata importing the implemented array: + + $strata = new SimpleXMLElement(file_get_contents("http://strata.localhost/v2/strata/xml.api")); + +The following code implements the _xml.api_ call for fallout importing the implemented array: + + $fallout = new SimpleXMLElement(file_get_contents("http://strata.localhost/v2/fallout/xml.api")); Modified: *.xoops.org (Subdomain APIs & Sites)/whois.xoops.org/README.md =================================================================== --- *.xoops.org (Subdomain APIs & Sites)/whois.xoops.org/README.md 2018-02-23 10:45:37 UTC (rev 13343) +++ *.xoops.org (Subdomain APIs & Sites)/whois.xoops.org/README.md 2018-02-24 13:38:12 UTC (rev 13344) @@ -46,3 +46,63 @@ # Installation Copy the contents of this archive/repository to the run time environment, configue apache2, ngix or iis to resolve the path of this repository and run the HTML Installer. + +# Implementing in PHP + +This is the example on how to implement this API in PHP + +## 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")); Modified: *.xoops.org (Subdomain APIs & Sites)/whois.xoops.org/class/whois.php =================================================================== --- *.xoops.org (Subdomain APIs & Sites)/whois.xoops.org/class/whois.php 2018-02-23 10:45:37 UTC (rev 13343) +++ *.xoops.org (Subdomain APIs & Sites)/whois.xoops.org/class/whois.php 2018-02-24 13:38:12 UTC (rev 13344) @@ -94,7 +94,7 @@ "ck" =>"whois.nic.ck", "cl" =>"whois.nic.cl", "cn" =>"whois.cnnic.net.cn", - "com" =>"whois.nic.com", + "com" =>"whois.verisign-grs.com", "coop" =>"whois.nic.coop", "cx" =>"whois.nic.cx", "cy" =>"whois.ripe.net", @@ -207,7 +207,7 @@ "tp" =>"whois.nic.tl", "tr" =>"whois.nic.tr", "travel" =>"whois.nic.travel", - "tv" => "tvwhois.verisign-grs.com", + "tv" => "tvwhois.verisign-grs.com", "tw" =>"whois.twnic.net.tw", "ua" =>"whois.net.ua", "ug" =>"whois.co.ug", Modified: *.xoops.org (Subdomain APIs & Sites)/whois.xoops.org/include/version.php =================================================================== --- *.xoops.org (Subdomain APIs & Sites)/whois.xoops.org/include/version.php 2018-02-23 10:45:37 UTC (rev 13343) +++ *.xoops.org (Subdomain APIs & Sites)/whois.xoops.org/include/version.php 2018-02-24 13:38:12 UTC (rev 13344) @@ -41,5 +41,5 @@ /** * Define API version */ -define('API_VERSION', 'WhoIS REST Services API 2.2.14'); +define('API_VERSION', 'WhoIS REST Services API 2.3.0'); define('API_TYPE', 'whois-api'); |