PHP code example of biaoqianwo / face

1. Go to this page and download the library: Download biaoqianwo/face 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/ */

    

biaoqianwo / face example snippets


use Biaoqianwo\Face\Application as BiaoFace;

$app = new BiaoFace([
    'appKey' => 'appKey',
    'secretKey' => 'secretKey'
]);
//人脸比对
$result = $app->baidu->match($files);

$app->platform->$method($files, $options = [])

$app->baidu->match($files, [
    'max_face_num' => 1,
    'face_fields'  => 'expression',
]);

use Biaoqianwo\Face\Application as BiaoFace;

$app = new BiaoFace([
      'appcode' => '40bc103c7fe6417b87152f6f68bead2f',
    ]
]);

$app->aliyun->match($files);

use Biaoqianwo\Face\Application as BiaoFace;

$app = new BiaoFace([
    'appId' => '1254032478',
    'secretId' => 'AKIDzODdB1nOELz0T8CEjTEkgKJOob3t2Tso',
    'secretKey' => '6aHHkz236LOYu0nRuBwn5PwT0x3km7EL',
    'bucket' => 'test1'
]);

$app->tencent->match($files);