boltegg/whois

Whois class

1.0.0 2016-03-09 19:58 UTC

This package is not auto-updated.

Last update: 2024-11-10 01:42:58 UTC


README

PHP class to retrieve WHOIS information.

Installing

composer require boltegg/whois @dev

Methods

Get whois information

<?php

$whois = new \Whois();

$domain = 'google.com';

$whois_result = $whois->getInfo($domain);
echo $whois_result;

Get domain status

<?php

$whois = new \Whois();

if ($whois->isAvailable($domain)) {
    echo "Domain is available\n";
} else {
    echo "Domain is registered\n";
}