Return to Snippet

Revision: 87521
at November 17, 2021 02:38 by hexgh12345


Updated Code
<?php
            //// Description:
            //********************************************************************************/
            // The purpose for this code is to find the domain age. 
            // Please enter the key and domain before you run the code , /
            // For information, please visit https://www.ip2whois.com /
            //********************************************************************************/
            $apiKey = 'Enter_License_Key';
            $domain = 'Enter_Domain_Name';
            $url = "https://api.ip2whois.com/v2?key=$apiKey&domain=$domain";            
            $data = json_decode(file_get_contents($url),true);
            echo "<br>Domain: ",$data['domain'], "<br>";
            echo "Domain Age: ",$data['domain_age'] ," days<br><br>";
        ?>

Revision: 80281
at March 2, 2020 07:40 by hexgh12345


Initial Title
How to get the domain age in PHP

Initial Description
This code is to find the domain age in PHP.

Initial Code
<?php
            //// Description:
            //********************************************************************************/
            // The purpose for this code is to find the domain age. 
            // Please enter the key and domain before you run the code , /
            // For information, please visit https://www.ip2whois.com /
            //********************************************************************************/
            $apiKey = 'Enter_License_Key';
            $domain = 'Enter_Domain_Name';
            $url = "https://api.ip2whois.com/v1?key=$apiKey&domain=$domain";            
            $data = json_decode(file_get_contents($url),true);
            echo "<br>Domain: ",$data['domain'], "<br>";
            echo "Domain Age: ",$data['domain_age'] ," days<br><br>";
        ?>

Initial Tags
php

Initial Language
PHP

Initial URL