PHPackages                             dvliweialiyuncs/aliyun-dysms-api-php-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. [API Development](/categories/api)
4. /
5. dvliweialiyuncs/aliyun-dysms-api-php-sdk

ActiveLibrary[API Development](/categories/api)

dvliweialiyuncs/aliyun-dysms-api-php-sdk
========================================

Aliyun API SMS SDK for PHP

016PHP

Since Jul 12Pushed 7y ago1 watchersCompare

[ Source](https://github.com/dvliwei/aliApiSmsSdk)[ Packagist](https://packagist.org/packages/dvliweialiyuncs/aliyun-dysms-api-php-sdk)[ RSS](/packages/dvliweialiyuncs-aliyun-dysms-api-php-sdk/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

\##使用

### 部署文档

[](#部署文档)

```
   /**
     * @return DefaultAcsClient
     */
    public static function getAcsClient() {
        // product name， please remain unchanged
        $product = "Dysmsapi";

        // product domain, please remain unchanged
        $domain = "dysmsapi.ap-southeast-1.aliyuncs.com";

        // AccessKey and AccessKeySecret , you can login sms console and find it in API Management
        $accessKeyId = env('ALI_ACCESSKEYID');
        $accessKeySecret = env('ALI_ACCESSKEYSECRET');

        $region = "ap-southeast-1";
        $endPointName = "ap-southeast-1";

        if(static::$acsClient == null) {

            $profile = DefaultProfile::getProfile($region, $accessKeyId, $accessKeySecret);

            DefaultProfile::addEndpoint($endPointName, $region, $product, $domain);

            static::$acsClient = new DefaultAcsClient();
        }
        return static::$acsClient;
    }

     /**
        *
        * sms短信
        * sns 推送消息
        * @param $phone_number
        */
       public function sendSms($phone,$code='12345'){

           $request =  new SendSmsRequest();

           $request->setPhoneNumbers($phone);

           $request->setContentCode(env('ALI_CONTENTCODE'));

           $request->setContentParam( json_encode(["code"=>$code],JSON_UNESCAPED_UNICODE)
           );
           $acsResponse = static::getAcsClient()->getAcsResponse($request);
           if(!empty($acsResponse) && (string)$acsResponse->ResultCode=='OK'){
               $publishData = ["code"=>$code];
               Log::info("Awssms publishData",['postData'=>$publishData,'resultData'=>serialize($acsResponse)]);
               return (object)self::SUCCESS;
           }else{
               Log::error('exception message'.$acsResponse->ResultMessage);
               return (object)self::RESPONSE_CODE_SMS_SEND_FAIL;
           }

       }

```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity40

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.

### Community

Maintainers

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

---

Top Contributors

[![dvliwei](https://avatars.githubusercontent.com/u/4515059?v=4)](https://github.com/dvliwei "dvliwei (8 commits)")

### Embed Badge

![Health badge](/badges/dvliweialiyuncs-aliyun-dysms-api-php-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/dvliweialiyuncs-aliyun-dysms-api-php-sdk/health.svg)](https://phpackages.com/packages/dvliweialiyuncs-aliyun-dysms-api-php-sdk)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

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