互億無線 · 文檔中心

企業(yè)工商四要素 - 代碼示例


php對接企業(yè)工商信息核驗接口DEMO示例
本文為您提供了php語言版本的企業(yè)工商四要素核驗對接DEMO示例

企業(yè)工商信息四要素接口文檔 點擊下載

企業(yè)工商信息四要素接入指南 點擊訪問


// 接口類型:互億無線實名認(rèn)證接口
// 賬戶注冊:https://user.ihuyi.com/register.html
// 注意事項:
// 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;
}

$account = 'APPID';
$password = 'APPKEY';
$app = 'ent4';//固定值
$name = '張三';
$id_card_no = '123456789012345678';
$ent_name = '上海xx公司';
$ent_code = '987876xxxx';
$time = time();
$password = md5($account.$password.$app.$name.$id_card_no.$ent_name.$ent_code.$time);

$target = "https://api.ihuyi.com/idcard/Submit.json";
$post_data = "account=".$account."&password=".$password."&app=".$app."&name=".$name."&id_card_no=".$id_card_no."&ent_name=".$ent_name."&ent_code=".$ent_code."&time=".$time;

//密碼可以使用明文密碼或使用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)證通過";
}

現(xiàn)在注冊,即享新用戶禮包!

在線咨詢
電話咨詢

服務(wù)熱線:

4008 808 898

服務(wù)熱線(工作時間):

4008 808 898

業(yè)務(wù)咨詢(非工作時間):

售后咨詢(非工作時間):

驗證碼已發(fā)送到您的手機(jī),請查收!

輸入驗證碼后,點擊“開通體驗賬戶”按鈕可立即開通體驗賬戶。

收不到短信驗證碼?
互億無線不提供接碼服務(wù),接碼用戶請勿點擊開通按鈕。
×