Guest User

Untitled

a guest
Jan 13th, 2023
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.40 KB | None | 0 0
  1. <?php
  2.  
  3.     if (!isset($_POST['recaptcha'])) die('stop spam');
  4.  
  5.     $secretKey = '(moj klucz prywatny)';
  6.     $token = $_POST['recaptcha'];
  7.     $ip = $_SERVER['REMOTE_ADDR'];
  8.  
  9.     $url = 'https://www.google.com/recaptcha/api/siteverify?secret=' . $secretKey . '&response=' . $token . '&remoteip=' . $ip;
  10.     $request = file_get_contents($url);
  11.     $response = json_decode($request);
  12.  
  13.     print_r($response);
Add Comment
Please, Sign In to add comment