{"id":19956090,"url":"https://github.com/krowinski/one-click-captcha","last_synced_at":"2025-08-05T23:23:39.743Z","repository":{"id":8023868,"uuid":"9432999","full_name":"krowinski/one-click-captcha","owner":"krowinski","description":"Simple captcha that requires from user to only click a cut circle on image with several other circles. You can customize color of circles, background, width and height of image. Its very lightweight require no js just simple form in html and php gd extension.","archived":false,"fork":false,"pushed_at":"2018-08-06T22:32:32.000Z","size":24,"stargazers_count":14,"open_issues_count":2,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-07T20:56:18.006Z","etag":null,"topics":["captcha","captcha-image","captcha-validation","circle","cut","php","position"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/krowinski.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-04-14T18:11:37.000Z","updated_at":"2025-04-03T23:48:33.000Z","dependencies_parsed_at":"2022-08-06T20:15:26.713Z","dependency_job_id":null,"html_url":"https://github.com/krowinski/one-click-captcha","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krowinski%2Fone-click-captcha","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krowinski%2Fone-click-captcha/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krowinski%2Fone-click-captcha/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krowinski%2Fone-click-captcha/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/krowinski","download_url":"https://codeload.github.com/krowinski/one-click-captcha/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252242213,"owners_count":21717122,"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","captcha-image","captcha-validation","circle","cut","php","position"],"created_at":"2024-11-13T01:30:01.723Z","updated_at":"2025-05-03T19:32:39.282Z","avatar_url":"https://github.com/krowinski.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OneClick captcha \n\n[![Build Status](https://travis-ci.org/krowinski/one-click-captcha.svg?branch=1.2)](https://travis-ci.org/krowinski/one-click-captcha)\n[![Latest Stable Version](https://poser.pugx.org/krowinski/one-click-captcha/v/stable)](https://packagist.org/packages/krowinski/one-click-captcha) [![Total Downloads](https://poser.pugx.org/krowinski/one-click-captcha/downloads)](https://packagist.org/packages/krowinski/one-click-captcha) [![Latest Unstable Version](https://poser.pugx.org/krowinski/one-click-captcha/v/unstable)](https://packagist.org/packages/krowinski/one-click-captcha) [![License](https://poser.pugx.org/krowinski/one-click-captcha/license)](https://packagist.org/packages/krowinski/one-click-captcha)\n\nThis lib can perform CAPTCHA validation based on user clicks on circles.\n\nIt render an image with several circles on random positions. Only one circle appears cut.\n\nThe class performs CAPTCHA validation by checking the position where the user clicks on the image to verify it it is inside of the circle that is cut.\n\nThe generated image is served in PNG format. The values of the rendered circles are stored in session variables for subsequent validation.\n\nThe size and colors of the image and the circles are configurable parameters.\n\n###### 1. install using composer ######\n```bash\ncomposer require krowinski/one-click-captcha\n```\n###### 2. example ######\n\n```php\n\ninclude __DIR__ . '/../vendor/autoload.php';\nerror_reporting(E_ALL);\n$OneClickCaptchaServiceFactory = new \\OneClickCaptcha\\Service\\OneClickCaptchaServiceFactory();\n$oneClickCaptcha = $OneClickCaptchaServiceFactory-\u003egetOneClickCaptcha();\n// simple demonstration!\n$request = isset($_GET['get_captcha']) ? $_GET['get_captcha'] : '';\nif ($request === 'true') {\n    $oneClickCaptcha-\u003eshowCaptcha();\n} else {\n    if (isset($_REQUEST['position'][0], $_REQUEST['position'][1])) {\n        if (true === $oneClickCaptcha-\u003evalidate($_REQUEST['position'][0], $_REQUEST['position'][1])) {\n            echo '\u003ch3\u003eYou are human!!\u003c/h3\u003e';\n        } else {\n            echo '\u003ch3\u003eWrong!\u003c/h3\u003e';\n        }\n    }\n}\n// this is all html you need to validate captcha\necho '\n\u003cform action=\"example.php\" method=\"POST\"\u003e\n\t\u003cinput type=\"image\" src=\"example.php?get_captcha=true\" name=\"position[]\"/\u003e\n\u003c/form\u003e\n';\n\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrowinski%2Fone-click-captcha","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkrowinski%2Fone-click-captcha","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrowinski%2Fone-click-captcha/lists"}