码迷,mamicode.com
首页 > Web开发 > 详细

php 调用 web Server(短信接口示例)

时间:2015-06-29 19:41:28      阅读:167      评论:0      收藏:0      [点我收藏+]

标签:

 1             if ($messageApiUrl != NULL && $messageInterface != NULL) {
 2                 $client = new soapclient($messageApiUrl);
 3                 $message_content = ‘尊敬的‘ . $wxName . ‘, ‘ . $messageDesc;
 4                 $message_content .= ‘消费店铺:‘ . $tempBranch . ‘;消费金额:¥‘ . $tempPayAmount . ‘;消费积分:‘ . $tempDeductedPoint . ‘;积分余额:‘ . $tempAccountMemberPoint;
 5                 $schedule_time = time();
 6                 $messageParam = array(‘username‘ => $messageAccount, ‘userpwd‘ => $messagePsw, ‘sendcont‘ => $message_content, ‘sendmobile‘ => $wxMobile, ‘senddate‘ => $schedule_time);
 7                 $resMessage = $client->__call(‘SmsSend‘, array($messageParam));
 8                 $resMessage2 = get_object_vars($resMessage);
 9                 if ($resMessage2[‘SmsSendResult‘] == ‘1_1‘) {
10                     //短信发送成功
11                 }
12             }

 

php 调用 web Server(短信接口示例)

标签:

原文地址:http://www.cnblogs.com/gmblog/p/4608158.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!