|
|
|
@ -1197,7 +1197,7 @@ function age_verify($cardno, $name)
|
|
|
|
|
} else {
|
|
|
|
|
return 2;
|
|
|
|
|
}
|
|
|
|
|
} elseif ($date['status'] > 200) {
|
|
|
|
|
} elseif (isset($date['status']) && $date['status'] != '01') {
|
|
|
|
|
return -2;
|
|
|
|
|
} else {
|
|
|
|
|
return $date;
|
|
|
|
@ -1210,11 +1210,11 @@ function age($cardno, $name)
|
|
|
|
|
$host = "https://idcardcert.market.alicloudapi.com";
|
|
|
|
|
$path = "/idCardCert";
|
|
|
|
|
$method = "GET";
|
|
|
|
|
$appcode = C('tool_age.appcode');
|
|
|
|
|
// $appcode = "244181f0846541a19e24df409736d3b9";
|
|
|
|
|
// $appcode = C('tool_age.appcode');
|
|
|
|
|
$appcode = "244181f0846541a19e24df409736d3b9";
|
|
|
|
|
$headers = array();
|
|
|
|
|
array_push($headers, "Authorization:APPCODE " . $appcode);
|
|
|
|
|
$querys = "idCard=" . $cardno . "&name=" . $name;
|
|
|
|
|
$querys ="idCard={$cardno}&name={$name}";
|
|
|
|
|
$bodys = "";
|
|
|
|
|
$url = $host . $path . "?" . $querys;
|
|
|
|
|
$curl = curl_init();
|
|
|
|
@ -1223,7 +1223,7 @@ function age($cardno, $name)
|
|
|
|
|
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
|
|
|
|
|
curl_setopt($curl, CURLOPT_FAILONERROR, false);
|
|
|
|
|
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
|
|
|
|
|
curl_setopt($curl, CURLOPT_HEADER, true);
|
|
|
|
|
curl_setopt($curl, CURLOPT_HEADER, false);
|
|
|
|
|
if (1 == strpos("$" . $host, "https://")) {
|
|
|
|
|
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
|
|
|
|
|
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
|
|
|
|
@ -1236,18 +1236,7 @@ function age($cardno, $name)
|
|
|
|
|
$r = json_decode($output, true);
|
|
|
|
|
if ($r['status'] == "02") return 0;
|
|
|
|
|
return $r;
|
|
|
|
|
// if (empty($output)) {
|
|
|
|
|
// return -1;//用完
|
|
|
|
|
// }
|
|
|
|
|
// if (curl_getinfo($curl, CURLINFO_HTTP_CODE) == '200') {
|
|
|
|
|
// $headersize = curl_getinfo($curl, CURLINFO_HEADER_SIZE);
|
|
|
|
|
// $header = substr($output, 0, $headersize);
|
|
|
|
|
// $body = substr($output, $headersize);
|
|
|
|
|
// curl_close($curl);
|
|
|
|
|
// return json_decode($body, true);
|
|
|
|
|
// } else {
|
|
|
|
|
// return -2;//失败
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*短信发送验证限制条件 */
|
|
|
|
|