$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 发送失败号码