а√在线中文网新版地址在线,播五月开心婷婷综合,午夜国产精品视频在线,√8天堂资源地址中文在线,80岁色老头oldmanvideos

注冊送短信

DEMO: Factor/mobile_status - 運營商在網狀態(tài)



<?php

/*****************
 * 示例代碼
 ******************/
//appid參數 appkey參數在     身份認證-創(chuàng)建/管理AppID中獲取
$appid      = '6***3';                                                                  //appid參數
$appkey     = '5d****************************58';                                       //appkey參數
$timestamp  = time();                                                                   //獲取當前時間戳
$mobile     = '152********';                                                            //待驗證用戶 電話號碼

$temp_data = array(
    'appkey'    => $appkey ,
    'timestamp' => $timestamp,
    'mobile'    => $mobile,
);

//生成簽名
ksort($temp_data);
reset($temp_data);
$signature = hash('sha256', http_build_query($temp_data));

$post_data = array(
    'appid'     => $appid,
    'timestamp' => $timestamp,
    'signature' => $signature,
    'mobile'    => $mobile,
);

$curl = curl_init();
curl_setopt_array($curl, array(
    CURLOPT_URL             => "https://tpa.mysubmail.com/factor/mobile_status",
    CURLOPT_RETURNTRANSFER  => true,
    CURLOPT_HTTP_VERSION    => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST   => "POST",
    CURLOPT_POSTFIELDS      => http_build_query($post_data),
    CURLOPT_HTTPHEADER      => array("Content-Type: application/x-www-form-urlencoded"),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);

if ($err) {
    echo "cURL Error #:" . $err;
} else {
    echo $response;
}