Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
This repository was archived by the owner on Apr 27, 2023. It is now read-only.
/nsone-phpPublic archive

NS1 PHP SDK

License

NotificationsYou must be signed in to change notification settings

ns1/nsone-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Please note:At this time, theNS1 PHP package isDEPRECATED and isnot feature complete. We suggest using one of our other packages forproduction integrations.

This package provides a PHP SDK for accessing the NSONE DNS platform and includes both a simple NSONE REST API wrapper as well as a higher level interface for managing zones, records, data feeds, and more.

It requires PHP 5.3+ and the curl extension.

Getting Started

Create an API key

You'll need a REST API key. Login to the your account athttp://my.nsone.net (or create a new, free account athttp://nsone.net/signup). Click on Account in the top right, then Settings & Users. At the bottom, in the Manage API Keys section, click Add a New Key and set an appropriate name. If you wish, adjust permissions for this key.

Install nsone-php (Using Composer):

We recommend using composer (http://getcomposer.org) to manage the nsone-php package. If you don't already have it, first install Composer into your project directory:

curl -sS https://getcomposer.org/installer| php

Edit (or create) composer.json in your project root to include nsone-php:

{"require":{"nsone/nsone-php":"~0.1"}}

Then in your project, make sure you require the composer autoloader:

require'vendor/autoload.php';

Create config file

For example, nsone.json

{"default_key":"account1","verbosity":5,"keys":{"account1":{"key":"qACMD09OJXBxT7XOuRs8","desc":"account number 1"},"account2":{"key":"qACMD09OJXBxT7XOwv9v","desc":"account number 2"}}}

Connect

require'vendor/autoload.php';useNSONE\Client;useNSONE\Config;$config =newConfig();$config->loadFromFile('nsone.json');$nsone =newClient(array('config' =>$config));$zone =$nsone->createZone('newzone2.com',array('nx_ttl' =>100));$zone->update(array('nx_ttl' =>200));print_r($zone->qps());print_r($zone->usage());$zone->delete();$zone =$nsone->loadZone('test.com');print_r($zone->qps());

Contributions

Pull Requests and issues are welcome. See theNS1 Contribution Guidelines for more information.

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp