RTX 实时通知实现
//require_once('./lib/nusoap.php');
//$client = new soapclient('http://web11.99mr.com:8012/rtx.php?wsdl');
//
//$message = array('send_to' => '1993,1826', 'title' => '1111', 'body' => '2222');
//$result = $client->call('sendmessage', array('message' => $message));
//print_r($result);
//exit;
function sendrtx($url){
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$contents = curl_exec($ch);
curl_close($ch);
return $contents;
}
$send_to = '1993,1826';//逗号分隔表示多个rtx帐号
$title = iconv('utf-8','gb2312','大放送'); //发送的标题
$body = iconv('utf-8','gb2312',"[莆田|http://www.putianb2b.com]卧槽卧槽卧槽槽;真真假假");//发送的内容
$message = sendrtx("http://web11.99mr.com:8012/rtx.php?send_to=$send_to&title=$title&body=$body");
if($message=='yes')
{
echo '发送成功';
}else{
echo '发送失败';
}