custom fsi
This commit is contained in:
parent
5450124be9
commit
4b4f33777c
|
@ -104,17 +104,33 @@ class ApiController extends Controller {
|
||||||
$data[] = "123"; //person_id
|
$data[] = "123"; //person_id
|
||||||
$data[] = "+7"; //timezone
|
$data[] = "+7"; //timezone
|
||||||
$text = implode("|", $data);
|
$text = implode("|", $data);
|
||||||
$res = json_decode(file_get_contents($ip . "/api/box/face_recognition_auth_v2?token=" . $tk, false, stream_context_create([
|
$res = json_decode(file_get_contents($ip . "/api/oem/face_recognition?token=" . $tk, false, stream_context_create([
|
||||||
'http' => [
|
'http' => [
|
||||||
'header' => "Content-Type: application/json",
|
'header' => "Content-Type: application/json",
|
||||||
'method' => "POST",
|
'method' => "POST",
|
||||||
'content' => json_encode([
|
'content' => json_encode([
|
||||||
'image' => base64_encode(file_get_contents("/var/www/html/BiFace_Server_Lite/web/data/uploads/face/" . $fileName)),
|
'image' => base64_encode(file_get_contents("/var/www/html/BiFace_Server_Lite/web/data/uploads/face/" . $fileName)),
|
||||||
'data' => common::rsaEncode($text),
|
'camera_id' => strval($id_camera),
|
||||||
|
'frametime' => date("Y-m-d H:i:s", $time),
|
||||||
|
'idCard' => $staffInfo ? strval($staffInfo->code) : "0",
|
||||||
|
'idObject' => $staffInfo ? $staffInfo->staff_id : "",
|
||||||
|
"person_id" => "123",
|
||||||
|
"timezone" => "+7",
|
||||||
'confidence' => isset($post["confidence"]["percent1"]) ? $post["confidence"]["percent1"] : 0
|
'confidence' => isset($post["confidence"]["percent1"]) ? $post["confidence"]["percent1"] : 0
|
||||||
])
|
])
|
||||||
]
|
]
|
||||||
])), true);
|
])), true);
|
||||||
|
// $res = json_decode(file_get_contents($ip . "/api/box/face_recognition_auth_v2?token=" . $tk, false, stream_context_create([
|
||||||
|
// 'http' => [
|
||||||
|
// 'header' => "Content-Type: application/json",
|
||||||
|
// 'method' => "POST",
|
||||||
|
// 'content' => json_encode([
|
||||||
|
// 'image' => base64_encode(file_get_contents("/var/www/html/BiFace_Server_Lite/web/data/uploads/face/" . $fileName)),
|
||||||
|
// 'data' => common::rsaEncode($text),
|
||||||
|
// 'confidence' => isset($post["confidence"]["percent1"]) ? $post["confidence"]["percent1"] : 0
|
||||||
|
// ])
|
||||||
|
// ]
|
||||||
|
// ])), true);
|
||||||
if ($res['status'] == 10000) {
|
if ($res['status'] == 10000) {
|
||||||
$logsInfo->sync_status = 1;
|
$logsInfo->sync_status = 1;
|
||||||
$logsInfo->save();
|
$logsInfo->save();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user