· 7 years ago · Aug 29, 2018, 05:46 AM
1<?php
2
3 getReady($_GET['id'], $_GET['key']);
4
5 function getReady($request_id = null, $secret_key = null) {
6
7 if($request_id == null || $secret_key == null) exit(json_encode(array("status" => 0, "request" => "Not all parameters are specified!")));
8 $request = json_decode(file_get_contents("http://rucaptcha.com/res.php?key=" . $secret_key . "&action=get&id=" . $request_id . "&json=1"), true);
9
10 if($request['status'] != 1) {
11 sleep(2);
12 getReady($request_id, $secret_key);
13 } else {
14 exit(json_encode(array("status" => 1, "request" => $request["request"])));
15 }
16 }
17?>