smoqadam / php-whois
a class written in php for get domain information
dev-master
2016-04-14 19:55 UTC
This package is auto-updated.
Last update: 2026-02-19 15:36:46 UTC
README
PHP Whois
a class for get domain information
Install
create a composer.json and put the following code in it :
{
"require": {
"smoqadam/php-whois": "@dev"
}
}
then run $ composer install
How to use
<?php
require 'src/Smoqadam/Whois.php';
$whois = new Smoqadam\Whois();
echo $whois->getDomainInfo('google.com');
if($whois->isAvailable('google.com'))
echo 'GOOGLE.COM is available for register';
else
echo 'GOOGLE.COM is not available for register';
if you want to return output as HTML just set the second parameter to True
<?php
require 'src/Smoqadam/Whois.php';
$whois = new Smoqadam\Whois();
echo $whois->getDomainInfo('google.com',true);