PHPackages                             kuaidaili2023/kdl-sdk - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. kuaidaili2023/kdl-sdk

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

kuaidaili2023/kdl-sdk
=====================

sdk for php

v1.0.0(3y ago)066MITPHP

Since Apr 7Pushed 3y ago1 watchersCompare

[ Source](https://github.com/Lucifer20211202/kuaidaili-php-sdk)[ Packagist](https://packagist.org/packages/kuaidaili2023/kdl-sdk)[ RSS](/packages/kuaidaili2023-kdl-sdk/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

简介
==

[](#简介)

快代理php api-sdk

示例
--

[](#示例)

以私密代理订单使用为例

```
 "hmacsha1" // 认证方式, token或hmacsha1 默认为token
        # ...
    #)

    # 获取订单到期时间, 返回时间字符串
    var_dump($client -> getExpireTime($args=array("sign_type" => "hmacsha1")));

    # 获取User-Agent, 返回ua数组
    # 参数说明:(
    # "num"=>"提取数量"
    # "dt"=>"系统类型(pc,mobile,pad)",
    # "browser"=>"浏览器(chrome,ie,firefox,weixin)",
    # "platform"=>"系统类型(win,mac,linux,ios)"
    # )
    var_dump($client->getUA($args = array("num" => "30", "sign_type" => "token", "dt" => "pc", "browser" => "chrome", "platform" => "win")));

    # 设置ip白名单，参数为一个包含"iplist"的关联数组
    # 成功则返回True, 否则false
    # 参数$args可以传或者不传。不传表示将当前外网ip设置到白名单
    var_dump($client -> setIpWhiteList(
            $args=array(
                //  "iplist" => array("5.6.23.2", "45.23.1.5"),
                "sign_type" => "hmacsha1"
            )
    ));
    # 获取ip白名单，返回ip数组
    var_dump($client -> getIpWhiteList());

    # 获取私密代理
    # 返回值为一个包含ip的数组
    $ips = $client -> getDps($args=array(
            "num" => 2, // 提取数量
            "sign_type" => 'token',
            "format" => 'json' // 如果format不指定为json, 将会以为原始内容返回。而不是以数组形式返回
            )
    );
    var_dump($ips);
    # 检测私密代理有效性： 返回 ip: 1/0 组成的关联数组。1表示有效，0表示无效
    $valids = $client -> checkDpsValid($args=array(
                "proxy" => $ips
                )
            );
    var_dump($valids);
    $second = $client -> getDpsValidTime($args=array(
                "proxy" => $ips
                )
            );
    var_dump($second);

    # 获取计数版ip余额（仅私密代理计数版）
    $balance = $client -> getIpBalance($args=array(
            "sign_type" => 'hmacsha1'
            )
    );
    var_dump($balance);

    // # 获取代理鉴权信息
    // # 获取指定订单访问代理IP的鉴权信息。
    // # 鉴权信息包含用户名密码，用于请求私密代理/独享代理/隧道代理时进行身份验证。

    // # 具体请看：https://www.kuaidaili.com/doc/api/getproxyauthorization/
    // # 参数$args为关联数组
    //     # plain_text 为1 表示明文显示用户名和密码
    var_dump($client -> getProxyAuthorization(
            $args=array(
                "plaintext"=>1,
                "sign_type"=>"token"
                )
        ));
```

```
  您可以在examples目录下找到更详细的示例

```

参考资料
----

[](#参考资料)

- [查看API列表](https://www.kuaidaili.com/doc/api/)
- [了解API鉴权](https://www.kuaidaili.com/doc/api/auth/)

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

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

1131d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/24e04f64d553e9702632f9439482007c85a2179dfe414fffbef3ea86215722ff?d=identicon)[Lucifer20211202](/maintainers/Lucifer20211202)

### Embed Badge

![Health badge](/badges/kuaidaili2023-kdl-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/kuaidaili2023-kdl-sdk/health.svg)](https://phpackages.com/packages/kuaidaili2023-kdl-sdk)
```

###  Alternatives

[s1lentium/iptools

PHP Library for manipulating network addresses (IPv4 and IPv6)

2446.2M24](/packages/s1lentium-iptools)[rector/swiss-knife

Swiss knife in pocket of every upgrade architect

2001.9M55](/packages/rector-swiss-knife)[rogervila/array-diff-multidimensional

Compare the difference between two multidimensional arrays

1134.4M8](/packages/rogervila-array-diff-multidimensional)[typo3/cms-lowlevel

TYPO3 CMS Lowlevel - Technical analysis of the system. This includes raw database search, checking relations, counting pages and records etc.

177.6M206](/packages/typo3-cms-lowlevel)[jfcherng/php-mb-string

A high performance multibytes sting implementation for frequently reading/writing operations.

145.1M1](/packages/jfcherng-php-mb-string)[symfony/object-mapper

Provides a way to map an object to another object

34885.7k18](/packages/symfony-object-mapper)

PHPackages © 2026

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