Skip to content

Latest commit

 

History

History
60 lines (36 loc) · 1.8 KB

README.md

File metadata and controls

60 lines (36 loc) · 1.8 KB

The PHP Azure Face API makes it easy for developers to access Azure Face API in their PHP code.

SmartDog23 - PHP Azure Face API

License Latest Stable Version Total Downloads

PHP Azure Face API is a PHP Client that make easy to use Azure's Face Recognition API

$azureFaceApi = new AzureFaceApi('YOUR_KEY', AzureRegions::EAST_US);
$result = $azureFaceApi->largePersonGroup()->create()->execute('test-group', 'description of the group');

echo $result->getBody()->getContents();

Help and docs

Sample Laravel Project

Installation

The recommended way to install LaravelAzureFaceAPI is through Composer.

composer require smartdog23/php-azure-face-api

Usage

Using the simple mode

$azureFaceApi = new AzureFaceApi('YOUR_KEY', AzureRegions::EAST_US);
$result = $azureFaceApi->largePersonGroup()->create()->execute('test-group', 'description of the group');

echo $result->getBody()->getContents();

Using the advanced mode

$azureFaceApi = new AzureFaceApi('YOUR_KEY', AzureRegions::EAST_US);

$options = new CreateOptions();
$options->parameters()->largePersonGroupId('test-group');
$options->body()->name('description of the group');
$result = $azureFaceApi->largePersonGroup()->create()->executeWithOptions($options);
echo $result->getBody()->getContents();