pananames / api
This package is abandoned and no longer maintained.
No replacement package was suggested.
PHP client for Pananames APIv2
2.0.6
2018-05-04 15:19 UTC
Requires
- php: >=5.5
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^6.2
Requires (Dev)
- phpunit/phpunit: ^5.7
This package is not auto-updated.
Last update: 2022-10-06 09:51:40 UTC
README
- API version: 2.0.0
Requirements
PHP 5.5 and later
Installation & Usage
Composer
To install the bindings via Composer, add the following to composer.json
:
{
"require": {
"pananames/api": "^2.0"
}
}
Then run composer install
Manual Installation
Download the files and include autoload.php
:
require_once(__DIR__ . '/vendor/autoload.php');
Getting Started
Please follow the installation procedure and then run the following:
<?php require_once(__DIR__ . '/vendor/autoload.php'); use Pananames\Api\DomainsApi; $domainsApi = new DomainsApi('SIGNATURE', 'URL'); $response = $domainsApi->check('domain-example.com'); if ($response->hasErrors()) { $errors = $response->getErrors(); //Log etc. return; } $data = $response->getData(); $httpCode = $response->getHttpCode(); $isSuccessful = $response->isSuccessful(); $isAvailable = $data->getAvailable(); $isPremium = $data->getPremium(); ?>