电脑安全

您当前的位置:主页 > 电脑安全 >

php短信接口程序-网络编程

来源:[db:来源]标题:   帐号    编辑:电脑技术全能网 时间:2019-09-19 12:33

原标题:php短信接口程序-网络编程
   $loginname = ""; // 接口帐号$pass = ""; // 接口暗码$code = "";$subid = "";$sender = "";$receivers = ""; // 接受号码,多个号码间用 ; 分开$settimer = ""; // 准时发送时光 格局:YYYY-MM-DD HH:MM$message = urlencode("");$cmd = "send";$allowforward = "";$recordid_client = ""; // 短信的客户端记载号$http = "http://interface.37du.net/interface_sms_url.ajax";$file = $http."?loginname=".$loginname."&pass=".$pass."&code=".$code."&subid=".$subid."&sender=".$sender."&receivers=".$receivers."&settimer=".$settimer."&message=".$message."&cmd=".$cmd."&allowforward=".$allowforward."&recordid_client=".$recordid_client;$xml = new XMLReader();$xml->open($file);$xml->setParserProperty(2,true);while ($xml->read()) {switch ($xml->name) {case "Success": $xml->read();$Success = $xml->value;$xml->read();break;case "Fail": $xml->read();$Fail = $xml->value;$xml->read();break;case "RetCode": $xml->read();$RetCode = $xml->value;$xml->read();break;case "SmsRemain": $xml->read();$SmsRemain = $xml->value;$xml->read();break;case "ErrPhones": $xml->read();$ErrPhones = $xml->value;$xml->read();break;}}$xml->close();// $Success 发送胜利条数// $Fail 发送失利条数// $RetCode 发送状况值// $SmsRemain 接口帐号余额// $ErrPhones 发送失利号码