use AlibabaCloud\Client\AlibabaCloud;
use AlibabaCloud\Client\Exception\ClientException;
use AlibabaCloud\Client\Exception\ServerException;
// Download:https://github.com/aliyun/openapi-sdk-php
// Usage:https://github.com/aliyun/openapi-sdk-php/blob/master/README.md
AlibabaCloud::accessKeyClient('', '')
->regionId('cn-shanghai')
->asDefaultClient();
try {
$result = AlibabaCloud::rpc()
->product('facebody')
// ->scheme('https') // https | http
->version('2019-12-30')
->action('DetectMask')
->method('POST')
->host('facebody.cn-shanghai.aliyuncs.com')
->options([
'query' => [
'RegionId' => "cn-shanghai",
'ImageURL' => "https://viapi-test.oss-cn-shanghai.aliyuncs.com/test-team/tiankong/1%E5%8F%A3%E7%BD%A9%E8%AF%86%E5%88%AB.jpg",
],
])
->request();
print_r($result->toArray());
} catch (ClientException $e) {
echo $e->getErrorMessage() . PHP_EOL;
} catch (ServerException $e) {
echo $e->getErrorMessage() . PHP_EOL;
}