{"id":15095707,"url":"https://github.com/hexageek1337/recaptcha-codeigniter","last_synced_at":"2025-10-08T00:31:46.929Z","repository":{"id":62516133,"uuid":"309154822","full_name":"hexageek1337/reCAPTCHA-Codeigniter","owner":"hexageek1337","description":"Free to Use Library reCAPTCHA v2 for Codeigniter 4","archived":true,"fork":false,"pushed_at":"2022-11-28T15:38:05.000Z","size":40,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-15T20:34:01.187Z","etag":null,"topics":["codeigniter","codeigniter-library","codeigniter4","php","php-library","php7","recaptcha","recaptcha-api","recaptcha-v2","recaptchav2"],"latest_commit_sha":null,"homepage":"https://denny.my.id/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hexageek1337.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":["https://saweria.co/hexageek1337","https://sociabuzz.com/hexageek1337/tribe","https://paypal.me/hexageek1337"]}},"created_at":"2020-11-01T17:53:26.000Z","updated_at":"2024-06-26T08:53:35.000Z","dependencies_parsed_at":"2023-01-22T15:45:27.655Z","dependency_job_id":null,"html_url":"https://github.com/hexageek1337/reCAPTCHA-Codeigniter","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/hexageek1337%2FreCAPTCHA-Codeigniter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hexageek1337%2FreCAPTCHA-Codeigniter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hexageek1337%2FreCAPTCHA-Codeigniter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hexageek1337%2FreCAPTCHA-Codeigniter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hexageek1337","download_url":"https://codeload.github.com/hexageek1337/reCAPTCHA-Codeigniter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235669382,"owners_count":19026815,"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":["codeigniter","codeigniter-library","codeigniter4","php","php-library","php7","recaptcha","recaptcha-api","recaptcha-v2","recaptchav2"],"created_at":"2024-09-25T15:41:20.305Z","updated_at":"2025-10-08T00:31:46.622Z","avatar_url":"https://github.com/hexageek1337.png","language":"PHP","readme":"# reCAPTCHA Codeigniter 4\nFree to Use Library reCAPTCHA v2 for Codeigniter 4.\n\n# Note\nThis repostory already move to https://github.com/PHPDevsr/reCaptcha-Codeigniter4 \n\n# What is reCAPTCHA?\n\nreCAPTCHA is a free service that protects your site from spam and abuse. It uses advanced risk analysis engine to tell humans and bots apart. With the new API, a significant number of your valid human users will pass the reCAPTCHA challenge without having to solve a CAPTCHA (See blog for more details). reCAPTCHA comes in the form of a widget that you can easily add to your blog, forum, registration form, etc.\n\nSee [the details][1].\n\n# Sign up for an API key pair\n\nTo use reCAPTCHA, you need to [sign up for an API key pair][4] for your site. The key pair consists of a site key and secret. The site key is used to display the widget on your site. The secret authorizes communication between your application backend and the reCAPTCHA server to verify the user's response. The secret needs to be kept safe for security purposes.\n\n# Installation\n\ninstall with composer\n```bash\n$ composer require hexageek1337/recaptcha-codeigniter4\n```\n\nmanual install with git clone\n```bash\n$ git clone https://github.com/hexageek1337/reCAPTCHA-Codeigniter\n$ cd reCAPTCHA-Codeigniter-main\n$ cp app/Config/Settings.php your_application_folder/Config/\n$ cp app/Libraries/Recaptcha.php your_application_folder/Libraries/\n```\n\n# Usage\n\nSet your site key and secret on `app/Config/Settings.php` file\n\n```php\npublic $recaptcha_site_key = '';\npublic $recaptcha_secret_key = '';\npublic $recaptcha_lang = 'id';\n```\n\n### Render the reCAPTCHA widget\n\n```php\necho $this-\u003erecaptcha-\u003egetWidget();\n```\n\noutput:\n\n```html\n\u003cdiv class=\"g-recaptcha\" data-sitekey=\"xxxxx\" data-theme=\"light\" data-type=\"image\" data-size=\"normal\"  loading=\"lazy\"\u003e\u003c/div\u003e\n```\n\nchange default theme by pass array parameter\n\n```php\necho $this-\u003erecaptcha-\u003egetWidget(array('data-theme' =\u003e 'dark'));\n```\n\nchange default type by pass array parameter\n\n```php\necho $this-\u003erecaptcha-\u003egetWidget(array('data-theme' =\u003e 'dark', 'data-type' =\u003e 'audio'));\n```\n\n### Render Script Tag\n\n```php\necho $this-\u003erecaptcha-\u003egetScriptTag();\n```\n\noutput:\n\n```html\n\u003cscript type=\"text/javascript\" src=\"https://www.google.com/recaptcha/api.js?render=onload\u0026hl=id\" defer\u003e\u003c/script\u003e\n```\n\nchange render value by pass array parameter\n\n```php\necho $this-\u003erecaptcha-\u003egetScriptTag(array('render' =\u003e 'explicit'));\n```\n\nchange default language by pass array parameter\n\n```php\necho $this-\u003erecaptcha-\u003egetScriptTag(array('render' =\u003e 'explicit', 'hl' =\u003e 'zh-TW'));\n```\n\n### Verify Response\n\nCalls the reCAPTCHA siteverify API to verify whether the user passes `g-recaptcha-response` POST parameter.\n\n```php\n$captcha = $this-\u003erequest-\u003egetPost('g-recaptcha-response');\n$response = $this-\u003erecaptcha-\u003everifyResponse($captcha);\n```\n\ncheck success or fail\n\n```php\nif (isset($response['success']) and $response['success'] === true) {\n    echo \"You got it!\";\n}\n```\n\n# Regards\n\n- Bo-Yi Wu [@appleboy](https://twitter.com/appleboy)\n- Denny Septian Panggabean [github.com/hexageek1337](https://github.com/hexageek1337)\n\n[1]: https://www.google.com/recaptcha/intro/index.html\n[2]: http://www.codeigniter.com/\n[3]: https://developers.google.com/recaptcha/\n[4]: http://www.google.com/recaptcha/admin\n","funding_links":["https://saweria.co/hexageek1337","https://sociabuzz.com/hexageek1337/tribe","https://paypal.me/hexageek1337"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhexageek1337%2Frecaptcha-codeigniter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhexageek1337%2Frecaptcha-codeigniter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhexageek1337%2Frecaptcha-codeigniter/lists"}