phppackage / domain-check
Domain availability checker.
Installs: 42
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
pkg:composer/phppackage/domain-check
Requires
- php: ~7.0
Requires (Dev)
- php-mock/php-mock-phpunit: ^2.0
- phpunit/phpunit: 6.4.4
This package is not auto-updated.
Last update: 2020-01-24 17:32:52 UTC
README
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.