-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
60 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,60 @@ | ||
# GoogleCapcay | ||
**Google Capcay** merupakan PHP Library untuk verfikasi Google Captcha. | ||
Berikut cara penggunaan **Google Capcay** | ||
|
||
Install dulu dari composer: | ||
```bash | ||
>$ composer require amrikasir/googlecapcay | ||
``` | ||
|
||
baru deh di PHPnya. | ||
```php | ||
<?php | ||
require_once __DIR__ . '/vendor/autoload.php'; | ||
|
||
$GoogleCapcay = 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(); | ||
``` | ||
|
||
**Google Capcay** support chaining method | ||
|
||
```php | ||
<?php | ||
require_once __DIR__ . '/vendor/autoload.php'; | ||
|
||
$GoogleCapcay = new GoogleCapcay\GoogleCapcayVerified(); | ||
|
||
/* | ||
|------------------------------------------------------------------------------- | ||
| Sample Chaining Method | ||
*/ | ||
$GoogleCapcay->SecretKey('Disini Secret Keynya') | ||
->RespondCode() | ||
->Verified(); | ||
``` | ||
|
||
itu aja deh, terima bata, sama cendol aja deh. | ||
|
||
tolong di support yaa.., biar bisa pengembangan ke depannya. | ||
|
||
ntar niatnya juga bakalan masukin buat nambahin form HTML nya. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters