{"id":21541782,"url":"https://github.com/singka-tech/singka-hwocr","last_synced_at":"2026-05-20T03:13:24.719Z","repository":{"id":57051719,"uuid":"274900330","full_name":"SingKa-TECH/singka-hwocr","owner":"SingKa-TECH","description":"本项目集成了华为云OCR文字识别业务，支持ThinkPHP5.0、ThinkPHP5.1和ThinkPHP6.0，由宁波晟嘉网络科技有限公司维护。","archived":false,"fork":false,"pushed_at":"2020-06-25T11:43:02.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-17T22:59:33.858Z","etag":null,"topics":["hua-wei","huawei","huaweicloud","huaweiocr","laravel","ocr","thinkphp","thinkphp5","thinkphp51","thinkphp6"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SingKa-TECH.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-06-25T11:34:55.000Z","updated_at":"2020-07-02T10:47:41.000Z","dependencies_parsed_at":"2022-08-24T03:41:05.832Z","dependency_job_id":null,"html_url":"https://github.com/SingKa-TECH/singka-hwocr","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SingKa-TECH%2Fsingka-hwocr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SingKa-TECH%2Fsingka-hwocr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SingKa-TECH%2Fsingka-hwocr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SingKa-TECH%2Fsingka-hwocr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SingKa-TECH","download_url":"https://codeload.github.com/SingKa-TECH/singka-hwocr/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244124179,"owners_count":20401683,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hua-wei","huawei","huaweicloud","huaweiocr","laravel","ocr","thinkphp","thinkphp5","thinkphp51","thinkphp6"],"created_at":"2024-11-24T05:07:38.587Z","updated_at":"2026-05-20T03:13:24.665Z","avatar_url":"https://github.com/SingKa-TECH.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 华为云OCR文字识别\n\n#### 介绍\n本项目集成了华为云OCR文字识别业务，支持ThinkPHP5.0、ThinkPHP5.1和ThinkPHP6.0，由宁波晟嘉网络科技有限公司维护。\n\n#### 安装教程\n\n使用 `composer require singka/singka-hwocr` 命令行安装即可。\n\n#### 使用示例（基于ThinkPHP6.0）\n\n\n```php\n\u003c?php\n// +----------------------------------------------------------------------\n// | 胜家云 [ SingKa Cloud ]\n// +----------------------------------------------------------------------\n// | Copyright (c) 2016~2020 https://www.singka.net All rights reserved.\n// +----------------------------------------------------------------------\n// | 宁波晟嘉网络科技有限公司\n// +----------------------------------------------------------------------\n// | Author: ShyComet \u003cshycomet@qq.com\u003e\n// +----------------------------------------------------------------------\nnamespace app\\home\\controller;\n\nuse SingKa\\HwOcr\\HwOcr;\n\nclass Index extends Base\n{\n    /**\n    * OCR文字识别示例\n    *\n    * @appKey       华为云appKey\n    * @appSecret    华为云appSecret\n    * @regionName   资源所在区域\n    */\n    public function ocrDemo()\n    {\n        $config['appKey'] = 'YXMWB********PKZY';\n        $config['appSecret'] = 'wC2*em*7*********EDP';\n        $config['regionName'] = 'cn-north-4';\n        //分别传入配置、OCR识别类型、图片地址或Base64码和其他参数\n        $result = HwOcr::AkskRequest($config, 'business-license', 'http://tuoxing.shop/ocr/data/business-license-demo.jpg', []);\n        return json(json_decode($result, true));\n    }\n  \n}\n```\n\n#### 其他说明\n\n相关材料请查阅：\n[华为云文字识别](https://support.huaweicloud.com/ocr/index.html)\n[SDK简介](https://support.huaweicloud.com/sdkreference-ocr/ocr_04_0016.html)\n[API概览](https://support.huaweicloud.com/api-ocr/ocr_03_0047.html)\n\n作者联系方式：shycomet@163.com","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsingka-tech%2Fsingka-hwocr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsingka-tech%2Fsingka-hwocr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsingka-tech%2Fsingka-hwocr/lists"}