{"id":19647219,"url":"https://github.com/lovefc/captcha","last_synced_at":"2025-04-28T15:31:29.837Z","repository":{"id":62519245,"uuid":"211479338","full_name":"lovefc/captcha","owner":"lovefc","description":"php动态验证码类库","archived":false,"fork":false,"pushed_at":"2022-07-05T08:59:19.000Z","size":740,"stargazers_count":5,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-15T03:04:07.623Z","etag":null,"topics":["captcha","php"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lovefc.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-09-28T09:52:37.000Z","updated_at":"2024-03-06T10:47:50.000Z","dependencies_parsed_at":"2022-11-02T13:18:04.917Z","dependency_job_id":null,"html_url":"https://github.com/lovefc/captcha","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovefc%2Fcaptcha","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovefc%2Fcaptcha/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovefc%2Fcaptcha/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovefc%2Fcaptcha/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lovefc","download_url":"https://codeload.github.com/lovefc/captcha/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251338638,"owners_count":21573588,"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":["captcha","php"],"created_at":"2024-11-11T14:42:57.188Z","updated_at":"2025-04-28T15:31:24.823Z","avatar_url":"https://github.com/lovefc.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PHP动态验证码\n\n使用简单方便，增加你的摸鱼时间。\n\n自动判断中英文，中文时为中文随机数，英文时为英文随机数\n\n![avatar](/image/1.gif) \n\n![avatar](/image/2.gif)\n\n![avatar](/image/3.gif)\n\n![avatar](/image/4.gif)\n\n验证码字体是开源的站酷库黑体(中英文皆可用)，感谢站酷免费提供。\n\n### 安装\n\n直接下载源码或者使用 composer 安装\n\n````\n{\n    \"require\": {\n        \"lovefc/captcha\": \"0.0.3\"\n    }\t\t\n}\n````\n\n### 食用方法\n\n````\n\n/* 实例化 */\n$ver = new FC\\Captcha();\n\n/* 验证码的一些设置 */\n\n// 验证码宽度\n$ver-\u003ewidth = 300;\n\n// 验证码高度\n$ver-\u003eheight = 100;\n\n// 验证码个数\n$ver-\u003enums = 4;\n\n// 随机字符串\n$ver-\u003erandom = '舔狗不得好死';\n\n// 随机数大小\n$ver-\u003efont_size = 40;\n\n// 干扰线数量，为0时没有干扰线\n$ver-\u003einterfere_line = 50;\n\n// 字体路径\n//$ver-\u003efont_path = __DIR__.'/Font/zhankukuhei.ttf';\n\n// 是否为动态验证码\n//$ver-\u003eis_gif = true;\n\n// 动图帧数\n//$ver-\u003egif_fps = 10;\n\n\n/* 生成验证码 */\n$code = $ver-\u003egetCode();\n\n/*\n $_SESSION['code'] = $code\n ....(这里自己存Session或者Redis)\n*/\n\n/* 生成验证码图片 */\n$ver-\u003edoImg($code);\n\n````\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flovefc%2Fcaptcha","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flovefc%2Fcaptcha","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flovefc%2Fcaptcha/lists"}