asp如何通过websevice接口发送短信
websevice接口如下:
sysid=111111 (接入账号);
authCode=123456789 接入密码(密码+校验码),MD5 32位加密;
reqno=20120815194701 短信提交流水号
dest=13800138000 (接收号码)
sourceAddr=1061111111111 (消息源地址)
content=短信内容
param 手机号码数组,一次可发送多个号码
webservice接口地址:http://111.111.111.111:20/msgService/services/submitService?wsdl
找到一个PHP的示例,但无奈对PHP几乎不了解,求懂PHP的照着给改个asp的。
或者提供下解决方案。。感激不尽
<?
$PHONE="15186997171,18786077320,15180862841";
$CONTENT="测试:test";
//-- 向手机号码发送 --
$wsdl="http://111.111.111.111:20/msgService/services/submitService?wsdl";//webservice接口地址
$username="111111";//用户名(sendsmsuser)
$password="12345";//密码(sendsmsuser)
$checkcode="6789"; //校验码
$sourceAddr="1061111111111"; //消息源地址
$serialnumber= (string)time(); //流水号
$sysid=$username;
$authCode=MD5($password.$checkcode);
$reqno=$serialnumber;
mb_substr ($CONTENT, 0, 200, $MYOA_CHARSET);
if($SEND_TIME=="")
$SEND_TIME=date("Y-m-d H:i:s",time());
$message = iconv("gb2312","utf-8",$CONTENT);
$MY_ARRAY=explode(",",$PHONE);
$ARRAY_COUNT=sizeof($MY_ARRAY);
$ERROR_CODE="";
for($I=0;$I< $ARRAY_COUNT;$I++)
{
if(trim($MY_ARRAY[$I])!="")
{
if(is_number($MY_ARRAY[$I]) || $MY_ARRAY[$I][0] == "+" && is_number(substr($MY_ARRAY[$I], 1)))
{
$PHONE_LIST=array();
$PHONE_LIST[count($PHONE_LIST)]=$MY_ARRAY[$I];
$message = iconv("gb2312","utf-8",$CONTENT);
$ReqHeader=array(
'authCode'=> $authCode,
'reqno'=> $reqno,
'sysid'=> $sysid
);
$SmsSubmit=array(
'content'=> $message,
'dest' => $PHONE_LIST,
'param' => null,
'sourceAddr' => $sourceAddr
);
$parameters=array(
'arg0'=> $ReqHeader,
'arg1'=> $SmsSubmit
);
$client = new SoapClient($wsdl);
try
{
$result=$client->__Call("smsSubmit",array('parameters'=> $parameters ));
}
catch(SoapFault $e){}
}
}
}
?>
xmlhttp.Send(SoapRequest)
'显示结果,如果成功显示:200 OK
Response.Write xmlhttp.Status & " "
Response.Write xmlhttp.StatusText
Set xmlhttp = Nothing
%>