首页 短信 短信示例代码 发送短信[PHP]

发送短信示例代码[PHP]

作者: 阅读数:2327 上传时间:2016-03-10

发送短信

<?php

require_once 'curl.func.php';

$appkey = 'your_appkey_here';//你的appkey
$mobile = '13556811111,13556811112';//手机号 超过1024请用POST
$content = '用户您好。【极速数据】';//utf8
$url = "http://api.binstd.com/sms/send?appkey=$appkey&mobile=$mobile&content=$content";
$result = curlOpen($url);
$jsonarr = json_decode($result, true);
//exit(var_dump($jsonarr));
if($jsonarr['status'] != 0)
{
    echo $jsonarr['msg'];
    exit();
}
$result = $jsonarr['result'];
echo $result['count'].' '.$result['accountid'].'
';