SHARE
TWEET

Untitled

a guest Sep 22nd, 2019 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. $secret = "0xe60843E26890Ad4bA743971963221Fbc54d89980";
  4. $response = $_POST["response"];
  5. $referrer = $_POST["referrer"];
  6. $id = $_POST["id"];
  7. $ch = curl_init();
  8.  
  9. curl_setopt($ch, CURLOPT_URL,"https://hcaptcha.com/siteverify");
  10. curl_setopt($ch, CURLOPT_POST, 1);
  11. curl_setopt($ch, CURLOPT_POSTFIELDS, "secret=$secret&response=$response");
  12.  
  13. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  14.  
  15. $content = curl_exec($ch);
  16.  
  17. $success = json_decode($content)->success;
  18.  
  19. curl_close($ch);
  20.  
  21. if ($success) {
  22.     $data = $database->query("SELECT * FROM shortcuts WHERE id='$id'");
  23.    
  24.     $time = round(microtime(true) * 1000);
  25.    
  26.     while($row = $data->fetch_assoc()) {
  27.         $database->query("UPDATE shortcuts SET solves = solves + 1 WHERE id='$id'");
  28.         new Reward($database, $oauth, 0.0005);
  29.         $database->query("INSERT INTO shortcuts_analytics_solves VALUES ('$id', '$time', '$referrer')");
  30.        
  31.         $payload->link = $row["link"];
  32.         $payload->success = true;
  33.         $payload->message = "200: OK";
  34.         $payload->info = "Captcha solved.";
  35.        
  36.         $response = new Response($payload, "OK", "200");
  37.         $response->execute();
  38.         exit();
  39.     }
  40. }
  41.  
  42. $payload->success = true;
  43. $payload->message = "406: Not Acceptable";
  44. $payload->info = "Captcha failed.";
  45.    
  46. $response = new Response($payload, "Not Acceptable", "406");
  47. $response->execute();
  48. exit();
  49.  
  50. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top