Joke Collection Website - Blessing messages - How does php call api interface, mainly php calls Unicom and mobile api to send short messages?
How does php call api interface, mainly php calls Unicom and mobile api to send short messages?
$ this-& gt; Content = "send content";
$ this-& gt; Name = "SMS account ";
$ this-& gt; Pwd= "SMS password";
$ this-& gt; Mobile = "sent mobile phone number";
$argv = array(
name ' = & gt$ this-& gt; Name,//required parameter. User account
pwd ' = & gt$ this-& gt; Pwd,//required parameters. (web platform: interface password in basic information)
content ' = & gt$ this-& gt; Content,//Required parameter. Send content (1-500 Chinese characters) UTF-8 encoding.
Move' =>$ this-& gt;; Mobile,//required parameters. Mobile phone numbers, many of which are separated by English commas.
stime ' = >; ,//Optional parameter. Send time: send when filling in, and send when not filling in.
Symbol' =>$ this-& gt;; Sign,//Required parameter. User signature.
type ' = & gt$ this-& gt; Type,//required parameter. Fixed value pt
extno ' = & gt$ this-& gt; Extno // Optional parameters, spreading codes, user-defined spreading codes, numbers only.
);
//Construct the string to be published.
foreach($ argv as $ key = & gt; $value) {
If ($flag! =0) {
$params。 = " & amp;
$ flag = 1;
}
$params。 = $key。 "=";
$params。 = urlencode($ value);
$ flag = 1;
}
$url = "?" . $ params// submitted url
$ result URL = file _ get _ contents($ URL); //Get the sending status
- Related articles
- How does Apple find the location of the other party's mobile phone?
- How to cancel doctors in micro-medical health?
- How to send Mid-Autumn Festival blessing SMS?
- Move the card, turn on the weather forecast and send text messages. What short messages do you open?
- How to change the SMS background of OPPOr9
- Which is more professional in smuggling cases, Yingke or Deheng Law Firm?
- [ICBC] How to open the online banking SMS authentication of ICBC?
- How can I tell my family if I don't go home this Spring Festival?
- How to copy and send the information sent by others on WeChat?
- My Gionee mobile phone has annoying sounds every few minutes (what can I do for you? )