huasx / ai-face
PHP BaiDu Ai-Face Sdk
v1.0.6
2019-04-30 07:14 UTC
Requires
- php: >=7.1.0
- ext-curl: *
- ext-json: *
- ext-simplexml: *
Requires (Dev)
- phpunit/phpunit: ~6.0
This package is auto-updated.
Last update: 2024-12-29 05:32:55 UTC
README
baidu-ai-face
baidu ai face sdk for PHP
Usage
Download
composer require huasx/ai-face
Example
//get token $ret = $obj->init( [ 'client_id' => 'Your Client Id', 'client_secret' => 'Your Client Secret', ] )->getToken(); var_dump($ret->getBody()); //seach $search = [ 'image' => 'https://ai.bdstatic.com/file/52BC00FFD4754A6298D977EDAD033DA0', 'image_type' => 'URL', 'group_id_list' => 'group1', ]; $obj = new \AIFace\Baidu\Face(); $ret = $obj->init([ 'token' => $token, ])->search($search); var_dump($ret->getBody());