2017 © Pedro Peláez
 

library domain

Check domain name availability and WHOIS

image

webas/domain

Check domain name availability and WHOIS

  • Tuesday, January 9, 2018
  • by huglester
  • Repository
  • 1 Watchers
  • 0 Stars
  • 9 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 14 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Webas/Domain

Check availability of domain names and get WHOIS information., (*1)

Features

  • Check availability of domains
  • Retrieve WHOIS information of domains
  • Support for over 350 TLDs, including new generic TLDs like .coffee or .sexy
  • Compatible with PHP ^7.0

Installation

$ composer require webas/domain

Usage

Library

The library contains two main classes: Whois\Client and Availability\Client They require information about WHOIS servers and patterns to match available domains stored in data/tld.json., (*2)

Whois

use Webas\Domain\Connection\ConnectionFactory;
use Webas\Domain\Data\DataLoader;
use Webas\Domain\Whois\Client;

$factory = new ConnectionFactory();
$dataLoader = new DataLoader();
$data = $dataLoader->load(__DIR__.'/data/tld.json');

$client = new Client($factory, $data);

echo $client->query($domainName);

Availability

To check the availability of a domain name the Availability\Client requires an instance of Whois\Client., (*3)

use Webas\Domain\Connection\ConnectionFactory;
use Webas\Domain\Data\DataLoader;
use Webas\Domain\Whois\Client as WhoisClient;
use Webas\Domain\Availability\Client as AvailabilityClient;

$factory = new ConnectionFactory();
$dataLoader = new DataLoader();
$data = $dataLoader->load(__DIR__.'/data/tld.json');

$whoisClient = new WhoisClient($factory, $data);
$client = new AvailabilityClient($whoisClient, $data);

echo $client->isAvailable($domainName);

Changelog

Version 0.1 (24 Nov 2017)

  • Initial release

THANKS

Special thanks for cocur/domain ! Awesome package., (*4)

googlegooglegg.nl, (*5)

The Versions

09/01 2018

dev-master

9999999-dev

Check domain name availability and WHOIS

  Sources   Download

MIT

The Requires

 

The Development Requires

domain whois

09/01 2018

v0.11

0.11.0.0

Check domain name availability and WHOIS

  Sources   Download

MIT

The Requires

 

The Development Requires

domain whois

19/05 2014