PHP OCR business license recognition

PHP OCR business license recognition

The local image file is called with PHP, and the content of the business license is recognized through the OCR of the cloud.

There is no PHP SDK provided!

Can't understand what filename means

I wrote it myself and I have no idea

public function bizlicense($picture) {

    if (!$picture || !is_array($picture)) {
        return Error::json(Error::$Param,'param picture must be array');

    $reqUrl = $this->conf->buildUrl('/ocr/bizlicense');
    $headers = $this->baseHeaders();
    $files = $this->baseParams();
    if (isset($picture['urls'])) {
        $headers[] ='Content-Type:application/json';
        $files['url_list'] = $picture['urls'];

        $data = json_encode($files);
    } else if (isset($picture['image'])){
        $headers[] ='Content-Type: multipart/form-data';
        $data[]='Content-Disposition: form-data; name="image"; filename="'.$picture['image'].'"';
        $data[]='Content-Type: image/jpeg';
    } else {
        return Error::json(Error::$Param,'param picture is illegal');

    return $this->doRequest(array(
        'url' => $reqUrl,
        'method' =>'POST',
        'data' => $data,
        'header' => $headers,
        'timeout' => $this->conf->timeout()
Reference: PHP OCR Business License Recognition-Cloud + Community-Tencent Cloud