PHP code example of thecoderin / faceplusplus-sdk
1. Go to this page and download the library: Download thecoderin/faceplusplus-sdk library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
thecoderin / faceplusplus-sdk example snippets
use Fpp\FppClient;
$host = 'https://api-cn.faceplusplus.com';
$apiKey = '<Your Key>';
$apiSecret = '<Your Secret>';
$client = new FppClient($apiKey, $apiSecret, $host);
$data = array(
'image_url' => "https://www.faceplusplus.com.cn/scripts/demoScript/images/demo-pic10.jpg",
'return_landmark' => '2',
'return_attributes' => 'age,headpose'
);
$resp = $client->detectFace($data);
var_dump($resp);