⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.229
Server IP:
95.217.99.93
Server:
Linux sv1.sonichosted.com 4.18.0-553.34.1.lve.el8.x86_64 #1 SMP Thu Jan 9 16:30:32 UTC 2025 x86_64
Server Software:
LiteSpeed
PHP Version:
8.2.29
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
lifestylescentra
/
public_html
/
app
/
Rules
/
View File Name :
CustomRecaptcha.php
<?php namespace App\Rules; use Cache; use Closure; use Illuminate\Contracts\Validation\ValidationRule; use ReCaptcha\ReCaptcha; class CustomRecaptcha implements ValidationRule { /** * Run the validation rule. * * @param \Closure(string): \Illuminate\Translation\PotentiallyTranslatedString $fail */ public function validate(string $attribute, mixed $value, Closure $fail): void { $setting = Cache::get('setting'); $recaptcha = new ReCaptcha($setting->recaptcha_secret_key); $response = $recaptcha->verify($value, $_SERVER['REMOTE_ADDR']); if (! $response->isSuccess()) { $notify_message = __('Please complete the recaptcha to submit the form'); $fail($notify_message); } } }