PHP code example of zhan3333 / alicloudapi

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

    

zhan3333 / alicloudapi example snippets


use Zhan3333\AliCloudApi\AliVerifyIdCardService;

$service = app(AliVerifyIdCardService::class);
$result = $service->verify('张三', '420222199212040000');
// boolean 是否验证通过
dump($result['valid']);
// 不通过时的原因
dump($result['reason']);