a1extran/dns-made-easy
最新稳定版本:1.1.1
Composer 安装命令:
composer require a1extran/dns-made-easy
包简介
PHP wrapper for the Dns Made Easy API.
README 文档
README
Example Usage
Create an instance of the DnsMadeEasy class
// log into your DNS Made Easy account to generate/obtain your API key and secret key. // specify TRUE for the last parameter if you want to make test API calls. $dme = new DnsMadeEasy('yourApiKey', 'yourSecretKey', TRUE);
Adding a domain
$result = $dme->domains->add('foobar.com'); if ($errors = $result->errors()) { print_r($errors); } else { // outputs the raw results print_r($result->rawBody()); // grab the JSON decoded results. // use TRUE to return an associative array, FALSE to return an object. $domain = $result->body(FALSE); // output the name servers associated with this domain. print_r($domain->nameServer); }
Adding a DNS record
$record = array( 'name' => '', 'type' => 'A', 'data' => '2.4.8.16', 'ttl' => 1800, ); $result = $dme->records->add('foobar.com', $record); if ($errors = $result->errors()) { print_r($errors); } else { // grab the JSON decoded results. // use TRUE to return an associative array, FALSE to return an object. $record = $result->body(FALSE); // output the assigned record ID print_r($record->id); }
统计信息
- 总下载量: 33.18k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 19
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2012-08-28