lyhiving/dnspod_api
Composer 安装命令:
composer require lyhiving/dnspod_api
包简介
The DNSPod User API is restricted to individual users, making it easier and more flexible for users to manage their own domain names and records.
README 文档
README
Dnspod_API
The DNSPod User API OR DNSPod中文文档 is restricted to individual users, making it easier and more flexible for users to manage their own domain names and records.
Need to cooperate with Curl extension
Installation
Use Composer to install the library. Of course, You can go to Packagist to view.
$ composer require lyhiving/dnspod_api
Initialization parameter
- Sample:
require_once dirname(__FILE__) . '/vendor/autoload.php'; use dnspod_api\Dnspod; $uid = 12345; $token = X12345; $DP = new Dnspod($uid, $token);
Add or modify records
- Sample:
$domain = 'example.com'; $value = array( '255.255.255.1', '255.255.255.2', '255.255.255.3', ); $name = 'www'; $type = 'A'; $DP->Records($domain, $value, $name, $type, true);
Copy A record
- Sample:
$domain = 'example.com'; $DP->copyArecord($domain);
Get domain information
- Sample:
$copyDomain = 'google.com'; $toDomain = 'example.com'; echo $DP->getDomainInfo($copyDomain, $toDomain);
Get a list of records
- Sample:
$domain = 'example.com'; echo $DP->getRecordList($domain);
Get details of batch tasks
- Sample:
$job_id = 'j12345'; echo $DP->getBatchDetail($job_id);
Add a single record
- Sample:
$domain = 'example.com'; $name = 'www'; $value = '255.255.255.0'; $type = 'A'; echo $DP->addRecord($domain, $name, $value, $type);
Add records in bulk
- Sample:
$domain_id = '12345'; $record[0] = array('name'=>'WWW', 'type'=>'A', 'value'='255.255.255.0', 'mx'=>1); echo $DP->batchAddRecord($domain_id, $record);
Modify record
- Sample:
$domain = 'example.com'; $record_id = 'E12345'; $name = 'WWW2'; $value = '255.255.255.0'; $type = 'A'; $mx = 1; echo $DP->recordModify($domain, $record_id, $name, $value, $type, $mx);
Modify record
- Sample:
$domain = 'example.com'; $record_id = 'E12345'; echo $DP->recordRemove($domain, $record_id);
Other functions
- Sample:
//Get the API version number echo $DP->getVersion(); //Get the level allowed line $domain = 'example.com'; echo $DP->getRecordLine($domain); //Change API Region to Global Network And $DP->setRegion('global'); //Change API Region to China Network $DP->setRegion('cn'); //Get a list of domain names echo $DP->getDomainList(); //Construct a new record table $name = 'example.com'; $type = 'A'; $value = '255.255.255.0'; $DP->newRecords($name, $type, $value); //Remove share record $domain = 'example.com'; $share_email = 'share@old.com'; echo $DP->shareRemove($domain, $share_email);
Original author
weibo: yakeing
Modify by lyhiving
lyhiving/dnspod_api 适用场景与选型建议
lyhiving/dnspod_api 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 11 次下载、GitHub Stars 达 0, 最近一次更新时间为 2019 年 10 月 16 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「dns」 「domain」 「IP」 「MX」 「a」 「ns」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 lyhiving/dnspod_api 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 lyhiving/dnspod_api 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 lyhiving/dnspod_api 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Implementation of subtitles converter with following supported formats: srt, webvtt, ttaf1, txt, tabtxt
A simple package that converts HTML into plain text using DOM methods
Simple PHP tool for parsing CSV or Excel spreadsheets
Build a domain-oriented application on Laravel Framework
Command bus implementation: Commands and domain events
A module manager for Zend Framework which can be used to create configs per domain.
统计信息
- 总下载量: 11
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 15
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MPL-2.0
- 更新时间: 2019-10-16
