PHP code example of amrikasir / googlecapcay
1. Go to this page and download the library: Download amrikasir/googlecapcay library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
amrikasir / googlecapcay example snippets
gleCapcay = new GoogleCapcay\GoogleCapcayVerified();
/*
|-------------------------------------------------------------------------------
| Secret Key harus diisi
*/
$GoogleCapcay->SecretKey('Disini Secret Keynya');
/*
|-------------------------------------------------------------------------------
| RespondCode ngak harus diisi, defaultnya ngambil value dari
| $_POST["g-recaptcha-response"]
*/
$GoogleCapcay->RespondCode();
/*
|-------------------------------------------------------------------------------
| Terakhir Verfikasi deh
|
| Return valuenya JSON dari Google Lho..
*/
$GoogleCapcay->Verified();
gleCapcay = new GoogleCapcay\GoogleCapcayVerified();
/*
|-------------------------------------------------------------------------------
| Sample Chaining Method
*/
$GoogleCapcay->SecretKey('Disini Secret Keynya')
->RespondCode()
->Verified();