PHP SMS interface is the development of the mall website, the app platform is essential, because these sites community or platform requires users to register or login. This article mainly and everyone to share the PHP SMS interface case, I hope to help everyone.
SMS Send Interface
1.1 Request Address
The request address is the URL address requested when the Client interface program is called, using the HTTPS post interface, the address is
Https://sh2.ipyy.com/sms.aspx Correspondence UTF-8
Https://sh2.ipyy.com/smsGBK.aspx Correspondence GB2312
Https://sh2.ipyy.com/smsJson.aspx corresponds to UTF-8 (return value is in JSON format)
Https://sh2.ipyy.com/ensms.ashx corresponding UTF-8 (encrypted transfer, using JSON)
The entry address generally does not change, and when changes occur, the interface user is notified
1.2 Parameter description
Parameter name |
meaning |
Description |
UserID |
Enterprise ID |
Enterprise ID (not verified) |
Account |
Send user account |
User account, by system administrator |
Password |
Send account password |
Password for user account can be used in clear text or full MD5 encryption, MD5 in 32-bit caps E99a18c428cb38d5f260853678922e03 if abc123 encrypted |
Mobile |
All called numbers |
The destination number of the text message. Comma-separated by commas between multiple numbers |
Content |
Send content |
Content of text message, content needs UTF-8 encoding, submission content format: Content + "signature". The signature is the name of the company or the company project name. Example: Your verification code: 1439 "Ascendas". "" is the signature identifier. Submit your content test in a formal format |
Sendtime |
Timed Send time |
Null means send now, timed send format 2010-10-24 09:08:10 |
Action |
Send Task command |
Set to fixed: send |
Extno |
Extension sub-number |
Please ask the configured channel to support the extension sub-number, if not support, please fill in the blanks. The child number can only be numeric, and a maximum of 5 digits. |
For example:
https://sh2.ipyy.com/sms.aspx?action=send&userid=&account= Account &password= Password &mobile= 15023239810,13527576163&content= content &sendtime=&extno=
1.3 Return value
After receiving the HTTPS request sent by the client, returns the processing result in XML. The format is:
<?xml version= "1.0" encoding= "Utf-8"?>
<returnsms>
<returnstatus>status</returnstatus>----------Return status value: Successful return success failed return: Faild
<message>message</message>----------Related error description
<remainpoint> remainpoint</remainpoint>----------return balance
<taskID>taskID</taskID>-----------Returns the sequence ID of this task
<successCounts>successCounts</successCounts>--Success Message number: Returns the number of successful messages after successful delivery
</returnsms>
1.4 JSON return value
{"ReturnStatus": "Success",
"Message": "Operation succeeded",
"Remainpoint": "-4",
"TaskID": "1504080852350206",
"Successcounts": "1"}
PHP SMS Interface Demo
<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">