古代洞房2国语版免费观看,日本暴力强伦轩视频,图书馆挺进她腿间湿润漫画 ,风流夫人免费观看高清电视剧

PHP DEMO


功能说明:该接口要求提前在云片后台添加模板,提交短信时,系统会自动匹配审核通过的模板,匹配成功任意一个模板即可发送。系统已提供的默认模板添加签名后可以直接使用。


<?php
header("Content-Type:text/html;charset=utf-8");
$apikey = "xxxxxxxxxxx"; //修改为您的apikey(http://m.jiadezhuangshi.cn)登录官网后获取
$mobile = "xxxxxxxxxxx"; //请用自己的手机号代替
$text="【云片网】您的验证码是1234,5分钟内有效。";
$ch = curl_init();

/* 设置验证方式 */
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Accept:text/plain;charset=utf-8',
    'Content-Type:application/x-www-form-urlencoded', 'charset=utf-8'));
/* 设置返回结果为流 */
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

/* 设置超时时间*/
curl_setopt($ch, CURLOPT_TIMEOUT, 10);

/* 设置通信方式 */
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);

// 取得用户信息
$json_data = get_user($ch,$apikey);
$array = json_decode($json_data,true);
echo '
<pre>';print_r($array);

// 发送短信
$data=array('text'=>$text,'apikey'=>$apikey,'mobile'=>$mobile);
$json_data = send($ch,$data);
$array = json_decode($json_data,true);
echo '
<pre>';print_r($array);

// 发送模板短信
// 需要对value进行编码
$data = array('tpl_id' => '365741', 'tpl_value' => ('#code#').
    '='.urlencode('1234').
    '&'.urlencode('#min#').
    '='.urlencode('5'), 'apikey' => $apikey, 'mobile' => $mobile);
print_r ($data);
$json_data = tpl_send($ch,$data);
$array = json_decode($json_data,true);
echo '
<pre>';print_r($array);

// 发送语音验证码
$data=array('code'=>'9876','apikey'=>$apikey,'mobile'=>$mobile);
$json_data =voice_send($ch,$data);
$array = json_decode($json_data,true);
echo '
<pre>';print_r($array);

 curl_close($ch);


/************************************************************************************/
//获得账户
function get_user($ch,$apikey){
    curl_setopt($ch, CURLOPT_URL, 'https://sms.yunpian.com/v2/user/get.json');
    curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query(array('apikey' => $apikey)));
    $result = curl_exec($ch);
    $error = curl_error($ch);
    checkErr($result,$error);
    return $result;
}
function send($ch,$data){
    curl_setopt($ch, CURLOPT_URL, 'https://sms.yunpian.com/v2/sms/single_send.json');
    curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
    $result = curl_exec($ch);
    $error = curl_error($ch);
    checkErr($result,$error);
    return $result;
}
function tpl_send($ch,$data){
    curl_setopt($ch, CURLOPT_URL,
        'https://sms.yunpian.com/v2/sms/tpl_single_send.json');
    curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
    $result = curl_exec($ch);
    $error = curl_error($ch);
    checkErr($result,$error);
    return $result;
}
function voice_send($ch,$data){
    curl_setopt($ch, CURLOPT_URL, 'http://voice.yunpian.com/v2/voice/send.json');
    curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
    $result = curl_exec($ch);
    $error = curl_error($ch);
    checkErr($result,$error);
    return $result;
}
function checkErr($result,$error) {
    if($result === false)
    {
        echo 'Curl error: ' . $error;
    }
    else
    {
        //echo '操作完成没有任何错误';
    }
}

?>
一字马扣出水来的下一句怎么接| 人狗大战5高清正版免费观看| 村上里沙| 妻子的妹妹免费版电视剧大全| 不想和你有遗憾电影在线观看| 成品网站1688入门怎么样| 51成人免费A片毛片无码| 韩国非常大度的电影原声| 妈妈与儿子高清免费版电视剧| 主人~我错了请把它关掉歌词 | 舞蹈生带着小玩具练芭蕾视频| 哈尼克孜| 小蓝彩虹男GARY2023的音..| 校花被教官扒开腿狂躁| 征服公务员韵母王强最新章节列表| 士豆网首页| 偷偷在线观看免费的电视剧最新| 来吧儿子妈妈是纯还是仿| 腿张开我要添到你高潮H漫画软件| 成品网站免费直播有哪些平台推荐| 日本大片又大又好看的PPT| 交换的温度2HD| 《善良的公与媳》| 《艳乳欲乱2》免费观看| 成品网站免费直播有哪些平台推荐| 法国空姐| 生殖瑜伽| 教官掀起衣服含着奶头H渺渺视频| 第79章厨房的欢愉方晴| 秘书(高干)笔趣阁小说推荐| 透明女仆服装开裆连体衣| 女友躲雨被老头玩弄| 录像狗配女人| 《无能的丈夫》完整版| 高压监狱2法国1时43分| 几天不C你骚水又多了第一集| 乱亲H女乱秽XXXX| 小诗的高中日记1-15| 乐可小说| 小妖精你真要我的命| 《老板送醉酒丈夫回家》