{"id":23872830,"url":"https://github.com/hongyukeji/sms","last_synced_at":"2025-06-17T07:34:45.334Z","repository":{"id":56985640,"uuid":"143298828","full_name":"hongyukeji/sms","owner":"hongyukeji","description":":iphone: SMS - 短信发送，从未如此简单。全网首款支持所有短信服务商，自由扩展，无缝对接。","archived":false,"fork":false,"pushed_at":"2020-08-11T11:36:26.000Z","size":90,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-06-01T15:32:57.775Z","etag":null,"topics":["laravel-sms","php-sms","sms","thinkphp-sms","yii-sms"],"latest_commit_sha":null,"homepage":"https://www.hongyuvip.com","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hongyukeji.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-08-02T13:31:12.000Z","updated_at":"2020-08-11T11:36:29.000Z","dependencies_parsed_at":"2022-08-21T12:20:44.204Z","dependency_job_id":null,"html_url":"https://github.com/hongyukeji/sms","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/hongyukeji/sms","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hongyukeji%2Fsms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hongyukeji%2Fsms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hongyukeji%2Fsms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hongyukeji%2Fsms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hongyukeji","download_url":"https://codeload.github.com/hongyukeji/sms/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hongyukeji%2Fsms/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260314974,"owners_count":22990684,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["laravel-sms","php-sms","sms","thinkphp-sms","yii-sms"],"created_at":"2025-01-03T16:35:07.304Z","updated_at":"2025-06-17T07:34:45.310Z","avatar_url":"https://github.com/hongyukeji.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eSMS - 短信发送，从未如此简单\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://packagist.org/packages/hongyukeji/sms\"\u003e\u003cimg src=\"https://poser.pugx.org/hongyukeji/sms/v/stable\" alt=\"Latest Stable Version\"\u003e\u003c/a\u003e\n\u003ca href=\"https://packagist.org/packages/hongyukeji/sms\"\u003e\u003cimg src=\"https://poser.pugx.org/hongyukeji/sms/downloads\" alt=\"Total Downloads\"\u003e\u003c/a\u003e\n\u003ca href=\"https://packagist.org/packages/hongyukeji/sms\"\u003e\u003cimg src=\"https://poser.pugx.org/hongyukeji/sms/v/unstable\" alt=\"Latest Unstable Version\"\u003e\u003c/a\u003e\n\u003ca href=\"https://packagist.org/packages/hongyukeji/sms\"\u003e\u003cimg src=\"https://poser.pugx.org/hongyukeji/sms/license\" alt=\"License\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003e 全网首款支持所有短信服务商，自由扩展，无缝对接。\n\n\u003e 采用鸿宇科技专利[《宏观设计模式》](docs/README.md)开发。\n\n\u003e 更多请点击 [https://www.hongyuvip.com](https://www.hongyuvip.com)\n\n\u003e 项目迁移至 [https://github.com/hongyukeji/php-sms](https://github.com/hongyukeji/php-sms)\n\n## 特点\n\n- 支持全网络短信服务商\n- 支持自由扩展且易维护\n\n## 支持\n\n- [阿里云](https://www.aliyun.com)\n- [云片网](https://www.yunpian.com)\n- [腾讯云](https://cloud.tencent.com/product/sms)\n- [短信宝](http://www.smsbao.com)\n- [赛邮云](https://www.mysubmail.com)\n- [SendCloud](https://www.sendcloud.net)\n- [互亿无线](http://www.ihuyi.com)\n- [创蓝253](https://www.253.com)\n- 上述短信服务商比较常用，其他短信如有需要可联系[Shadow](http://wpa.qq.com/msgrd?v=3\u0026uin=1527200768\u0026site=qq\u0026menu=yes)集成\n- 如需支持其他短信服务商，可以自行Fork，在`src/Sms.php`中添加对应的短信发送方法即可\n- 短信快速集成（参考[《宏观设计模式》](docs/README.md) — 鸿宇科技出品）\n\n## 环境\n\n- PHP \u003e= 5.6.0\n\n## 安装\n\n```shell\n$ composer require hongyukeji/sms\n```\n\n## 使用\n\n\u003e PHP框架中使用，配置文件参考 'docs/config/config.php' \n\n\u003e 短信发送参数详解: send([参数1-手机号: 支持字符串和数组格式],[参数2-模板: 支持模板Code和模板内容],[参数3-模板参数: 模板对应的参数, 数组格式],[参数4-短信服务商: 设置短信发送服务商, 该参数为空时调用配置文件中默认短信服务商])\n\n```php\nuse HongYuKeJi\\Helpers\\Sms;\n\n$config = [\n    'default' =\u003e [\n        'gateway' =\u003e 'aliyun',\n    ],\n    'gateways' =\u003e [\n        'yunpian' =\u003e [\n            'apikey' =\u003e '',\n        ],\n        'aliyun' =\u003e [\n            'accessKeyId' =\u003e '',\n            'accessKeySecret' =\u003e '',\n            'signName' =\u003e '',\n        ],\n        'qcloud' =\u003e [\n            'appid' =\u003e '',\n            'appkey' =\u003e '',\n            'smsSign' =\u003e '',\n        ],\n        'duanxinbao' =\u003e [\n            'user' =\u003e '',\n            'pass' =\u003e '',\n            'signName' =\u003e '',\n        ],\n        'submail' =\u003e [\n            'appid' =\u003e '',\n            'appkey' =\u003e '',\n        ],\n        'sendcloud' =\u003e [\n            'sms_user' =\u003e '',\n            'sms_key' =\u003e '',\n        ],\n        'ihuyi' =\u003e [\n            'apiid' =\u003e '',\n            'apikey' =\u003e '',\n        ],\n    ],\n];\n\n$sms = new Sms($config);\n\n// templateCode + templateParam\n$resultTemplateCode = $sms-\u003esend('13800138000', 'SMS_88888888', [\n    'code' =\u003e '1234',\n    'time' =\u003e '15分钟',\n]);\n\nvar_dump($resultTemplateCode);\n\n// templateContent + templateParam\n$resultTemplateContent = $sms-\u003esend(['13800138000', '13900139000'], '您的验证码是%s。有效期为%s，请尽快验证！', [\n    'code' =\u003e '1234',\n    'time' =\u003e '15分钟',\n], 'duanxinbao');\n\nvar_dump($resultTemplateContent);\n\n// return 返回值 status: success =\u003e 发送成功, fail =\u003e 发送失败\n$result = [\n    'status' =\u003e 'success',\n    'message' =\u003e '短信发送成功！',\n];\n```\n\n## 维护\n\n- Author：Shadow\n- QQ：[1527200768](http://wpa.qq.com/msgrd?v=3\u0026uin=1527200768\u0026site=qq\u0026menu=yes)\n- Email：[admin@hongyuvip.com](mailto:admin@hongyuvip.com)\n- QQ交流群：[90664526](http://shang.qq.com/wpa/qunwpa?idkey=a3e498d7d3329615c9b3d1dbbbc50e43fa80b39e93a1ae78f1fb0a268f3a0476)\n\n## 配置\n\n- [阿里云](https://help.aliyun.com/document_detail/55451.html)\n\n\u003e 使用说明：templateCode + templateParam\n\n```php\n'aliyun' =\u003e [\n    'accessKeyId' =\u003e '',\n    'accessKeySecret' =\u003e '',\n    'signName' =\u003e '',\n],\n```\n\n- [云片网](https://www.yunpian.com/doc/zh_CN/introduction/demos/php.html)\n\n\u003e 使用说明：templateCode + templateParam\n\n```php\n'yunpian' =\u003e [\n    'apikey' =\u003e '',\n],\n```\n\n- [腾讯云](https://cloud.tencent.com/document/product/382/9557)\n\n\u003e 使用说明：templateCode + templateParam\n\n```php\n'qcloud' =\u003e [\n    'appid' =\u003e '',\n    'appkey' =\u003e '',\n    'smsSign' =\u003e '',\n],\n```\n\n- [短信宝](http://www.smsbao.com/openapi/55.html)\n\n\u003e 使用说明：templateContent + templateParam\n\n```php\n'duanxinbao' =\u003e [\n    'user' =\u003e '',\n    'pass' =\u003e '',\n    'signName' =\u003e '',\n],\n```\n\n- [赛邮云](https://www.mysubmail.com/chs/documents/developer/t2f1J2)\n\n\u003e 使用说明：templateCode + templateParam\n\n```php\n'submail' =\u003e [\n    'appid' =\u003e '',\n    'appkey' =\u003e '',\n],\n```\n\n- [SendCloud](https://www.sendcloud.net/doc/sms)\n\n\u003e 使用说明：templateCode + templateParam\n\n```php\n'sendcloud' =\u003e [\n    'sms_user' =\u003e '',\n    'sms_key' =\u003e '',\n],\n```\n\n- [互亿无线](http://www.ihuyi.com/demo/sms/php.html)\n\n\u003e 使用说明：templateContent + templateParam\n\n```php\n'ihuyi' =\u003e [\n    'apiid' =\u003e '',\n    'apikey' =\u003e '',\n],\n```\n\n- [创蓝253](https://zz.253.com/api_doc/)\n\n\u003e 使用说明：templateContent + templateParam\n\n```php\n'chuanglan' =\u003e [\n    'api_send_url' =\u003e '',\n    'api_variable_url' =\u003e '',\n    'api_balance_query_url' =\u003e '',\n    'api_account' =\u003e '',\n    'api_password' =\u003e '',\n    'sms_sign' =\u003e '',\n],\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhongyukeji%2Fsms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhongyukeji%2Fsms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhongyukeji%2Fsms/lists"}