当前位置:Gxlcms > PHP教程 > PHP发短信PEAR包:Services_Sms_PHP教程

PHP发短信PEAR包:Services_Sms_PHP教程

时间:2021-07-01 10:21:17 帮助过:9人阅读

PHP发短信 PEAR 包:Services_Sms

对于这种第三方库,PHP官方称之为PEAR,需要按照PEAR标准开发(标准URI)。

PEAR的优势:一键安装到php/lib/php目录,require即可使用,很方便。

由于项目要发短信,所以我开发了一个,现在整理开源出来。安装步骤如下:

pear channel-discover sinkcup.github.io/ sinkcup/Services_Sms

0.0.1版支持下列短信服务商:

移通网络:http://www.etonenet.com/

短信宝:http://smsbao.com/

互亿无限:http://ihuyi.com/

使用步骤:

1、到短信服务商网站注册一个帐号,比如移通网络(http://www.etonenet.com/)。

2、demo(参考https://github.com/sinkcup/Services_Sms/blob/master/tests/Services/SmsTest.php):

 'Services/Sms.php' = 'spid' => 'foo',
    'sppassword' => 'bar',
    'apiUriPrefix' => 'http://esms.etonenet.com/', =  Services_Sms('etonenet',  = ->send('13800138000', 'Hello!树先生 etonenet'(?>

源代码:https://github.com/sinkcup/Services_Sms

sinkcup PEAR 频道:http://sinkcup.github.io/pear/

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/440184.htmlTechArticlePHP发短信 PEAR 包:Services_Sms 对于这种第三方库,PHP官方称之为PEAR,需要按照PEAR标准开发(标准URI)。 PEAR的优势:一键安装到php/lib/php目录...

人气教程排行