/pananames-php-api

PHP client for Pananames APIv2 refactored with Socks5 Proxy support

Primary LanguagePHPMIT LicenseMIT

Pananames.com API

  • 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();

?>

Documentation