Skip to content
This repository has been archived by the owner on May 19, 2018. It is now read-only.

Latest commit

 

History

History
76 lines (50 loc) · 2.04 KB

README.md

File metadata and controls

76 lines (50 loc) · 2.04 KB

Domain Checker

Build Status StyleCI Scrutinizer Code Quality Code Coverage Packagist Version Packagist Downloads

WIP: Domain availability checker.

Install

Require this package with composer using the following command:

$ composer require phppackage/domain-check

Usage example:

<?php
require 'vendor/autoload.php';

use \PHPPackage\DomainCheck\Checker;

// domain name (without tlds)
$name = 'mynewdomainnamexyz';

// define tlds
$tlds = [
    'com',
    'net'
];

// init checker class
$checker = new Checker($tlds);

/**
 * Lookup all tlds for a given name, e.g domain.com, domain.net ...
 * @return array
 */
$result = $checker->availability('domain');

Array
(
    [mynewdomainnamexyz] => Array
        (
            [com] => 1
            [net] => 1
        )

)

Testing

$ composer test

Contributing

Please see CONTRIBUTING for details.

Credits

License

The MIT License (MIT). Please see License File for more information.