attla / name-checker
Social and domain name availability search.
1.3.0
2019-09-30 20:32 UTC
Requires
- php: >=5.6
This package is auto-updated.
Last update: 2024-10-29 05:34:51 UTC
README
📒 Social and domain name availability search.
:squirrel: Investigate the live demo
Installation
Install the latest version with:
composer require attla/name-checker
If you don't have composer, learn how to install
Usage
require_once 'vendor/autoload.php'; use NameChecker\NameChecker; use NameChecker\Exceptions\NCException; try{ $NameChecker = new NameChecker(); # Social medias names echo '<pre>'; echo "My github is available ?\n"; var_export($NameChecker->github('jco666')->isAvailable()); echo "\nMy github exist ?\n"; var_export($NameChecker->isThere()); # Domain names echo "\n\n\nMy domain is available?\n"; var_export($NameChecker->domain('lsdev.cf')->isAvailable()); echo "\nMy domain exist ?\n"; var_export($NameChecker->isThere()); }catch(NCException $e){ echo $e->getMessage(), '<br>', $e->error_trace; }
More example usage
- Call types
# Instantiated Class $NameChecker = new NameChecker(); var_dump($NameChecker->github('jco666')->isAvailable()); echo '<br>'; # Static call var_dump(NameChecker::github('jco666')::isAvailable());
- Methods params
# NameChecker::method($type, $value) # Search by ID NameChecker::facebook('id', 'jco666')::isAvailable(); # or NameChecker::facebook('jco666')::isAvailable(); # Search by email, NameChecker::facebook('email', 'fedhrm@gmail.com')::isAvailable(); # Search by fone NameChecker::facebook('phone', 'fedhrm@gmail.com')::isAvailable();