PHP text message PEAR package: Services_Sms
For this third-party library, PHP officially calls it PEAR and needs to be developed according to the PEAR standard (Standard URI ).
PEAR advantages: one-click installation to the php/lib/php Directory, require can be used, very convenient.
Because the project needs to send text messages, I have developed one, which is now open-source. The installation procedure is as follows:
Pear channel-discover sinkcup. github. io/sinkcup/Services_Sms
0.0.1 supports the following text message service providers:
Mobile Network: http://www.etonenet.com/
SMS: http://smsbao.com/
Infinite mutual: http://ihuyi.com/
Procedure:
1, to the text message service provider website to register an account, such as mobile network (http://www.etonenet.com /).
2, demo (reference 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 ('20140901', 'Hello! Mr. etonenet '(?>
Source code: https://github.com/sinkcup/Services_Sms
Sinkcup PEAR channel: http://sinkcup.github.io/pear/