faceplusplus / facepp-php-sdk
Open FPP API SDK for php developers
Installs: 11 340
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 84
pkg:composer/faceplusplus/facepp-php-sdk
Requires
- php: ^7.1.3
This package is auto-updated.
Last update: 2025-10-25 10:33:30 UTC
README
Requirements
- PHP 5.5.9+.
- cURL extension.
- GD extension.
Structure
├── FppClient.php // the api client
└── lib
├── Adapter.php // the http request adapter, all request be sended by it
├── ContentTypes.php // request body content type
├── Image.php // the image process unit
├── MimeTypes.php // the request body mime type
├── MultiPartForm.php // multipart/for-data request class
├── Request.php // the request class
├── RequestException.php // exception
└── Response.php // the response class
Example
include_once 'FppClient.php'; 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);
License
licensed under the MIT