个人黑名单查询

<?php


$url = 'http://v.juhe.cn/personBlackList/query.php';//请求地址

$params = ['dtype'=>'json','key'=>'申请的聚合APPKEY','name'=>'姓名','cardNum'=>'身份证号码'];

$query = http_build_query($params); //格式化参数

var_dump(curlRequest($url.'?'.$query)); // 查询

//{"reason":"查询成功","result":"YES","error_code":0},有是yes


function curlRequest($url){

    $ch = curl_init();

    curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);

    curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);

    curl_setopt($ch, CURLOPT_TIMEOUT, 30);

    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);

    curl_setopt($ch, CURLOPT_URL, $url);


    $content = curl_exec($ch);

    return $content;

}


登录 后可发表评论

    最新发布
    聚合数据©版权所有