56短信网
短信插件-最全的短信插件
discuz短信接口-免费技术支持
来源:56短信网 发布人:客服一部 发表于:2016-07-08 10:48:31 阅读:
导读: 56短信网致力于为您提供安全,快捷,高效的短信接口服务,以下是discuz调用56短信网接口,如果您在接入中遇到什么问题,可以随时联系我们技术人员或由我们技术人员帮您完成调试。

56短信网致力于为您提供安全,快捷,高效的短信接口服务,以下是discuz调用56短信网接口,如果您在接入中遇到什么问题,可以随时联系我们技术人员或由我们技术人员帮您完成调试。


//构造要post的字符串
$params = "";
foreach ($messageArgv as $key => $value) {
    if ($flag != 0) {
        $params.= "&";
        $flag = 1;
    }
    $params.= $key . "=";
    $params.= urlencode($value);
    $flag = 1;
}


$length = strlen($params);
//创建socket连接
$fp = fsocketopen("jiekou.56dxw.com", 8061, &$errno, &$errstr, $timeout = 10);
//构造post请求的头
$header = "POST /WebServiceInterface.asmx/mdsmssend HTTP/1.1\r\n";
$header.= "Host:sdk.entinfo.cn\r\n";
$header.= "Content-Type: application/x-www-form-urlencoded\r\n";
$header.= "Content-Length: " . $length . "\r\n";
$header.= "Connection: Close\r\n\r\n";
//添加post的字符串
$header.= $params . "\r\n";
//发送post的数据
fputs($fp, $header);
$inheader = 1;
while (!feof($fp)) {
    $line = fgets($fp, 1024); //去除请求包的头只显示页面的返回数据
    if ($inheader && ($line == "\n" || $line == "\r\n")) {
        $inheader = 0;
    }
}
$line = str_replace("<string xmlns=\"http://tempuri.org/\">", "", $line);
$line = str_replace("</string>", "", $line);
$result = explode("-", $line);
include template('common/header_ajax');
if (count($result) > 1) {
    echo 'error|'.lang('plugin/tshuz_regphonecode', 'lang01');
}else{
    echo 'success|'.lang('plugin/tshuz_regphonecode', 'lang02');
}
include template('common/footer_ajax');
exit;
?>

 

56短信网,最好的短信接口提供商。


 

终于找到好的短信服务商了,赶紧测试一下吧 短信接口文档 联系客服人员测试
关于56短信网
  • 联系我们:
  • 电话:0311-85235895
  • 0311-89801332
  • Emaill:
  • jiekou@56dxw.com
  • (#替换成@)
栏目导航
短信接口文档
56短信插件
扫一扫 加微信
享24小时服务
版权所有:56短信网 网络经营许可证编号:冀ICP备08006792号