Skip to content

Latest commit

 

History

History
26 lines (20 loc) · 452 Bytes

README.md

File metadata and controls

26 lines (20 loc) · 452 Bytes

php-whois

PHP class to retrieve WHOIS information.

Installation

composer require "phois/whois"

Example of usage

<?php
require_once __DIR__ . '/src/Phois/Whois/Whois.php';

$domain = 'nabi.ir';

try {
    $domain = new Phois\Whois\Whois($domain);
} catch (InvalidArgumentException $e) {
    die($e->getMessage() . '\n');
}

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