想申请一个短信接口,公司用的。百度上那些感觉都不怎么靠谱,要三网能发的那种。请问有没有什么正规的地方申请的。怎么申请。 有申请过的帮忙解答一下。

解决方案 »

  1.   

    最近注册了一个秒嘀科技的,可以先免费使用的http://www.miaodiyun.com/php使用
    <?phpfunction curl_https($url, $data=array(), $header=array(), $timeout=30){    $ch = curl_init();
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); // 跳过证书检查
        curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, true);  // 从证书中检查SSL加密算法是否存在
        curl_setopt($ch, CURLOPT_URL, $url);
        curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
        curl_setopt($ch, CURLOPT_POST, true);
        curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 
        curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);    $response = curl_exec($ch);    if($error=curl_error($ch)){
            die($error);
        }    curl_close($ch);    return $response;}// 调用
    $time = date('YmdHis');$url = 'https://api.miaodiyun.com/20150822/industrySMS/sendSMS';
    $data = array(  'accountSid'=>'你的accountSid',
                    'smsContent'=>'【网站名称】您注册xxx网站的验证码为123456,请于20分钟内正确输入验证码。',
                    'to'=>'13888888888',
                    'timestamp'=>$time,
                    'sig'=>md5('你的accountSid+AUTH TOKEN'.$time),
                    'respDataType'=>'JSON'
                    );
    $header = array('Content-type:application/x-www-form-urlencoded');$response = curl_https($url, $data, $header);echo $response;