{"id":21526565,"url":"https://github.com/wxbool/funcode","last_synced_at":"2025-10-14T23:12:53.064Z","repository":{"id":57083033,"uuid":"192675998","full_name":"wxbool/funcode","owner":"wxbool","description":"建立一些好玩的接口","archived":false,"fork":false,"pushed_at":"2021-05-22T10:04:19.000Z","size":50,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-17T18:37:05.585Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/wxbool.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":"2019-06-19T06:53:51.000Z","updated_at":"2021-05-22T10:04:22.000Z","dependencies_parsed_at":"2022-08-24T14:58:23.835Z","dependency_job_id":null,"html_url":"https://github.com/wxbool/funcode","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wxbool/funcode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wxbool%2Ffuncode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wxbool%2Ffuncode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wxbool%2Ffuncode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wxbool%2Ffuncode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wxbool","download_url":"https://codeload.github.com/wxbool/funcode/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wxbool%2Ffuncode/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262543862,"owners_count":23326626,"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":[],"created_at":"2024-11-24T01:45:39.355Z","updated_at":"2025-10-14T23:12:52.960Z","avatar_url":"https://github.com/wxbool.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# funcode\n在这里，会整理创建一些好玩的接口。持续更新，敬请关注\n\n目前，已经整合的接口如下：\n* 阿里云·读光（图片文本识别）\n\n\n# 1. 环境要求\n* PHP version \u003e= 5.6（推荐 7.1）\n* PHP 扩展: curl, json, [`v8js`](https://www.php.net/manual/zh/book.v8js.php)\n\n\n# 2. 安装\n\n使用 composer:\n\n$ composer require wxbool/funcode dev-master\n\n\n# 3. 使用\n\n## 获取全局实例\n\n```\n$app = \\funcode\\App::instance();\n```\n$app 是所有应用对象的集合，全局统一使用 $app 进行获取应用实例。\n\n\n## 调用示例\n\n### 1. ocr图片文本识别（[`阿里云-读光`](https://duguang.aliyun.com/experience?type=doc\u0026midtype=fulldoc\u0026subtype=contract)）\n\n```\n//获得 读光 应用\n$duguang = $app-\u003eduguang;\n\n//请求图片识别\n\n//全文识别高精版识别\n$response = $duguang-\u003egeneral('https://img.alicdn.com/tfs/TB1GHXrXzDpK1RjSZFrXXa78VXa-912-1128.jpg');\n//英文专项识别\n$response = $duguang-\u003eeng('https://img.alicdn.com/tfs/TB1GHXrXzDpK1RjSZFrXXa78VXa-912-1128.jpg');\n//网络电商图片识别\n$response = $duguang-\u003eecommerce('https://img.alicdn.com/tfs/TB1GHXrXzDpK1RjSZFrXXa78VXa-912-1128.jpg');\n\nif ($response) {\n    //输出识别的文本（不换行）\n    $response-\u003econtent();\n    //输出识别的文本（换行）\n    $response-\u003econtentWrap();\n}\n\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwxbool%2Ffuncode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwxbool%2Ffuncode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwxbool%2Ffuncode/lists"}