PHPackages                             yakeing/dnspod\_api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. yakeing/dnspod\_api

AbandonedArchivedSymfony-bundle[API Development](/categories/api)

yakeing/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.

v2.5.0(6y ago)6566MPL-2.0PHPPHP &gt;=5.6

Since Jul 19Pushed 5y agoCompare

[ Source](https://github.com/yakeing/Dnspod_API)[ Packagist](https://packagist.org/packages/yakeing/dnspod_api)[ Docs](https://github.com/yakeing/Dnspod_API)[ RSS](/packages/yakeing-dnspod-api/feed)WikiDiscussions main Synced 3d ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Dnspod\_API
===========

[](#dnspod_api)

The [DNSPod User API](https://www.dnspod.com/docs/index.html) OR [DNSPod中文文档](https://www.dnspod.cn/docs/index.html) is restricted to individual users, making it easier and more flexible for users to manage their own domain names and records.

 China Hong Kong

 China Shandong Province

`Need to cooperate with Curl extension`

### Github badge

[](#github-badge)

[![Downloads](https://camo.githubusercontent.com/66b07dd2e00c1f69b22f03dcb3e83c829efcc1ded2d39d099f75d5b1afa3159b/68747470733a2f2f342e76657263656c2e6170702f6769746875622f646f776e6c6f6164732f79616b65696e672f646e73706f645f6170693f69636f6e3d676974687562)](../../)[![Size](https://camo.githubusercontent.com/dd4ee006cc390500d71e05e7625cfd2bfb6e8d7b16ad7ca56643106aab312421/68747470733a2f2f342e76657263656c2e6170702f6769746875622f73697a652f79616b65696e672f646e73706f645f6170693f69636f6e3d676974687562)](src)[![tag](https://camo.githubusercontent.com/e46df02e46bb00e60cfa0acbae87e671921bd1794ecd723a3f4962cdb59c5a89/68747470733a2f2f342e76657263656c2e6170702f6769746875622f7461672f79616b65696e672f646e73706f645f6170693f69636f6e3d676974687562)](../../releases)[![license](https://camo.githubusercontent.com/904c4bcc21898764c7b6b7edfba26ea0d5427757cfaee2837ee7bed32124b40b/68747470733a2f2f342e76657263656c2e6170702f7374617469632f6c6963656e73652f3535352f4d504c2d322e302f6665376433373f69636f6e3d676974687562)](LICENSE)[![languages](https://camo.githubusercontent.com/5275888fd9cd7a7b85d47b803d247819aa953b27342dfa420173152309ab1a18/68747470733a2f2f342e76657263656c2e6170702f7374617469632f6c616e67756167652f3535352f5048502f3334616265663f69636f6e3d676974687562)](../../search?l=php)

### Installation

[](#installation)

Use [Composer](https://getcomposer.org) to install the library. Of course, You can go to [Packagist](https://packagist.org/packages/yakeing/dnspod_api) to view.

```
    $ composer require yakeing/dnspod_api

```

### Initialization parameter

[](#initialization-parameter)

- Sample：

```
    $uid = 12345;
    $token = X12345;
    $DP = new Dnspod($uid, $token);
```

### Add or modify records

[](#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

[](#copy-a-record)

- Sample：

```
    $domain = 'example.com';
    $DP->copyArecord($domain);
```

### Get domain information

[](#get-domain-information)

- Sample：

```
    $copyDomain = 'google.com';
    $toDomain = 'example.com';
    echo $DP->getDomainInfo($copyDomain, $toDomain);
```

### Get a list of records

[](#get-a-list-of-records)

- Sample：

```
    $domain = 'example.com';
    echo $DP->getRecordList($domain);
```

### Get details of batch tasks

[](#get-details-of-batch-tasks)

- Sample：

```
    $job_id = 'j12345';
    echo $DP->getBatchDetail($job_id);
```

### Add a single record

[](#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

[](#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

[](#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

[](#modify-record-1)

- Sample：

```
    $domain = 'example.com';
    $record_id = 'E12345';
    echo $DP->recordRemove($domain, $record_id);
```

### Other functions

[](#other-functions)

- Sample：

```
    //Get the API version number
    echo $DP->getVersion();

    //Get the level allowed line
    $domain = 'example.com';
    echo $DP->getRecordLine($domain);

    //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);
```

[Sponsor](https://github.com/yakeing/Documentation/blob/master/Sponsor/README.md)
---------------------------------------------------------------------------------

[](#sponsor)

If you've got value from any of the content which I have created, then I would very much appreciate your support by payment donate.

[![Sponsor](https://camo.githubusercontent.com/8bf9004e5f53d2223ce47ceeed603c32154d9e6afa76039dd117bf91c5c1a685/68747470733a2f2f342e76657263656c2e6170702f7374617469632f53706f6e736f722f4541344141413f69636f6e3d6865617274)](https://github.com/yakeing/Documentation/blob/master/Sponsor/README.md)

Author
------

[](#author)

weibo: [yakeing](https://weibo.com/yakeing)

twitter: [yakeing](https://twitter.com/yakeing)

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2492d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/95aaf19e492f95c5180360b25e7197ff554625372973f3555b9792a07d5cb9f2?d=identicon)[yakeing](/maintainers/yakeing)

---

Top Contributors

[![yakeing](https://avatars.githubusercontent.com/u/6356091?v=4)](https://github.com/yakeing "yakeing (9 commits)")

---

Tags

aaaaacnamednsdomainipmxsrvtxtdnsIPdomainnsMXtxtaAAAAsrvcname

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/yakeing-dnspod-api/health.svg)

```
[![Health](https://phpackages.com/badges/yakeing-dnspod-api/health.svg)](https://phpackages.com/packages/yakeing-dnspod-api)
```

###  Alternatives

[geoip2/geoip2

MaxMind GeoIP2 PHP API

2.5k85.4M294](/packages/geoip2-geoip2)[ltd-beget/dns-zone-configurator

Php library for parsing and editing dns zones files programmatically with high level abstraction.

22163.7k](/packages/ltd-beget-dns-zone-configurator)[ok/ipstack-client

A PHP wrapper for using Ipstack API

10384.3k](/packages/ok-ipstack-client)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
