Skip to content
This repository was archived by the owner on Oct 3, 2022. It is now read-only.

Pananames/php-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

PHP client for Pananames APIv2

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages