PHPackages                             glz/dayu-client - 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. glz/dayu-client

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

glz/dayu-client
===============

一个超简洁的阿里大鱼客户端.

1.0.3(8y ago)157MITPHPPHP &gt;=5.2.0

Since Aug 10Pushed 8y ago1 watchersCompare

[ Source](https://github.com/xurenlu/dayu-client)[ Packagist](https://packagist.org/packages/glz/dayu-client)[ RSS](/packages/glz-dayu-client/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (3)Dependencies (1)Versions (4)Used By (0)

dayu-client 阿里大鱼发送短信客户端
=======================

[](#dayu-client-阿里大鱼发送短信客户端)

这是一个超简单的客户端，只有不到70行的代码，实现了利用阿里大鱼发送短信的功能。但是，我只拼装了接口地址出来，接下来您可以用curl 等工具都能取到接口的内容，也可以用guzzleHttp，snoopy第三方包来取得这个url地址的内容。所以，我根本就没有添加任何进行接口访问的依赖。 最好看一下代码，因为实在太短了，没有理由不看啊。。。。

安装方法:
=====

[](#安装方法)

composer 安装 :

```
 composer require glz/dayu-client dev-master"

```

如果不会composer，直接从[github](https://github.com/xurenlu/dayu-client)上把文件拉下来也行，反正源代码目录就一个文件。

使用方法
====

[](#使用方法)

直接上代码了

```
$smsSend = new DaYuClient("NjOBTNw0YRvJW0Un","VRhOKIuIe3DHumO8CIZ4R3eq8NCvWA");
$url =  $smsSend->getUrl4SendSms("手机号码", "示例短信签名", "SMS_****",
json_encode(["code"=>12345]),
    rand(1111,9999)
);// 这里的几个参数要改一下 ,倒数第二个参数 ，是对templateParam 进行json_encode后的字符串，是因为我的短信模板是"您的验证码是$code",所以我传的templateParam参数就是{"code":12345} .

/**
接下来，
*/
$guzzleClient = new \GuzzleHttp\Client();
$response = $guzzleClient->request('GET', $url);
$aliyunResponse = json_decode( $response->getBody(),true);
print_r($aliyunResponse);

```

入坑心得
====

[](#入坑心得)

1. 坑点之一：生成时间字符串的时候，要UTC的时区，所以，看代码，我们临时切到UTC了。
2. 坑点之二，他们的接口可能经常换，所以，我也不知道什么时候就不能用了。。。。
3. 不小心就把appkey 和我的secret写出来了 还好我第一时间删除了。

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity60

Established project with proven stability

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

Every ~51 days

Total

3

Last Release

3097d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/cbeae1ee5ec80c5fb7c2fcbf1f06f9a6b62cfc4e51b8489ec3b765c8abb457c0?d=identicon)[huanggun](/maintainers/huanggun)

### Embed Badge

![Health badge](/badges/glz-dayu-client/health.svg)

```
[![Health](https://phpackages.com/badges/glz-dayu-client/health.svg)](https://phpackages.com/packages/glz-dayu-client)
```

###  Alternatives

[shlinkio/shlink

A self-hosted and PHP-based URL shortener application with CLI and REST interfaces

4.8k4.3k](/packages/shlinkio-shlink)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)[dhlparcel/magento2-plugin

DHL Parcel plugin for Magento 2

11180.5k2](/packages/dhlparcel-magento2-plugin)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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