日期:2014-05-17 浏览次数:20566 次
<?php class SendSMSParam { public $ToUserText; public $ToUserByte; public $SMSContent; public $PlanSendTime; public $MSGType; public $LongCode; } class SendSMS { public $SMSParam; public $ECECCID; public $Password; } $userid=1234567;//接入账户 $pwd="abcdefg";//接入密码 $mobile="13800000000";//下发手机号 $content="php测试短信"; $client=new SoapClient("http://pi.f3.cn/F3WebService.asmx?WSDL"); $SMSParam = new SendSMSParam(); $SMSParam->ToUserText=$mobile; $SMSParam->SMSContent=$content; $SMSParam->MSGType=5; $SendSMSinfo=new SendSMS(); $SendSMSinfo->SMSParam=$SMSParam; $SendSMSinfo->ECECCID=$userid; $SendSMSinfo->Password=$pwd; print_r($SendSMSinfo); $client->SendSMS($SendSMSinfo); ?>
<s:element minOccurs="0" maxOccurs="1" name="SMSParam" type="tns:SendSMSParam"/> <s:element minOccurs="1" maxOccurs="1" name="ECECCID" type="s:long"/> <s:element minOccurs="0" maxOccurs="1" name="Password" type="s:string"/> <s:complexType name="SendSMSParam"> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="ToUserText" type="s:string"/> <s:element minOccurs="0" maxOccurs="1" name="ToUserByte" type="s:base64Binary"/> <s:element minOccurs="0" maxOccurs="1" name="SMSContent" type="s:string"/> <s:element minOccurs="1" maxOccurs="1" name="PlanSendTime" type="s:dateTime"/> <s:element minOccurs="1" maxOccurs="1" name="MSGType" type="tns:c"/> <s:element minOccurs="0" maxOccurs="1" name="LongCode" type="s:string"/> </s:sequence> </s:complexType> <s:simpleType name="MSGType"> <s:restriction base="s:string"> <s:enumeration value="NoSMS"/> <s:enumeration value="ShortSMS"/> <s:enumeration value="LongSMSNoPageNum"/> <s:enumeration value="LongSMSWithPageNum"/> <s:enumeration value="LongSMS"/> <s:enumeration value="WAPPush"/> <s:enumeration value="MMS"/> <s:enumeration value="NMS"/> </s:restriction> </s:simpleType>