首页
开发手册
应用中心
工具
用户中心
FoundPHP OCR Recognize Text
English
中文简体
English
上一篇
下一篇
## FoundPHP OCR Recognize Text This function uses Tencent text recognition OCR method, which can quickly and accurately identify the required content, and can locate the coordinates to facilitate the annotation of the content. Official certification manual. [https://cloud.tencent.com/document/api/866/33519](https://cloud.tencent.com/document/api/866/33519 "https://cloud.tencent.com/document/api/866/33519") ```php //configuration file $config['ocr']['type'] = 'tencent'; $config['ocr']['id'] = 'the secretId you applied for'; $config['ocr']['key'] = 'the secretKey you applied for'; $config['ocr']['region'] = 'ap-guangzhou'; //Can not change //declaration method $ocr = new FoundPHP_ocr($config['ocr']); $show = 0;//Default output array, 1 output json, display json $data = $ocr->post(array('file'=>'https://zealzoo.com/apk/1.jpg'),$show); //print out the result print_r($data); ```