The PHP Azure Face API makes it easy for developers to access Azure Face API in their PHP code.
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();
The recommended way to install LaravelAzureFaceAPI is through Composer.
composer require smartdog23/php-azure-face-api
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();