運(yùn)營(yíng)商二要素(證件號(hào)+手機(jī)號(hào))接口文檔 點(diǎn)擊下載
運(yùn)營(yíng)商二要素(證件號(hào)+手機(jī)號(hào))接入指南 點(diǎn)擊訪問(wèn)
// 接口類(lèi)型:互億無(wú)線實(shí)名認(rèn)證接口
// 賬戶(hù)注冊(cè):https://user.ihuyi.com/register.html
// 注意事項(xiàng):
// DEMO僅作參考
header("Content-type:text/html; charset=UTF-8");
function Post($curlPost,$url){
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_HEADER, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_NOBODY, true);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $curlPost);
$return_str = curl_exec($curl);
curl_close($curl);
return $return_str;
}
$app = "operator2id";
$account = "APIID";
$password = "APIKEY";
$id_card_no = "410XXXXXXXXXXXXXXXXXXX";
$mobile = "13600000000";
$time = time();
$password = md5($account.$password.$app.$id_card_no.$mobile.$time);
$target = "https://api.ihuyi.com/idcard/operator2id/Submit.json";
$post_data = "account=".$account."&password=".$password."&app=".$app."&id_card_no=".$id_card_no."&mobile=".$mobile."&time=".$time;
print_r($password);
//密碼可以使用明文密碼或使用32位MD5加密
$res = Post($post_data, $target);
$res_json = json_decode($res,true);
print_r($res_json);
if($res_json["code"]==2){
echo "提交成功";
}
if($res_json["result"]["status"]==2){
echo "認(rèn)證通過(guò)";
}
驗(yàn)證碼已發(fā)送到您的手機(jī),請(qǐng)查收!
輸入驗(yàn)證碼后,點(diǎn)擊“開(kāi)通體驗(yàn)賬戶(hù)”按鈕可立即開(kāi)通體驗(yàn)賬戶(hù)。