|
@@ -2,10 +2,6 @@
|
2
|
2
|
|
3
|
3
|
header("Content-Type: text/plain");
|
4
|
4
|
|
5
|
|
-var_dump($_POST);
|
6
|
|
-
|
7
|
|
-
|
8
|
|
-
|
9
|
5
|
$url = 'https://captcheck.netsyms.com/api.php';
|
10
|
6
|
$data = [
|
11
|
7
|
'session_id' => $_POST['captcheck_session_code'],
|
|
@@ -22,8 +18,16 @@ $options = [
|
22
|
18
|
$context = stream_context_create($options);
|
23
|
19
|
$result = file_get_contents($url, false, $context);
|
24
|
20
|
$resp = json_decode($result, TRUE);
|
|
21
|
+
|
|
22
|
+echo "Form fields:\n";
|
|
23
|
+var_export($_POST);
|
|
24
|
+echo "\n\nAPI request fields:\n";
|
|
25
|
+var_export($data);
|
|
26
|
+echo "\n\nAPI response (JSON):\n";
|
|
27
|
+echo json_encode(json_decode($result, TRUE), JSON_PRETTY_PRINT);
|
|
28
|
+
|
25
|
29
|
if (!$resp['result']) {
|
26
|
|
- exit("\n\nCAPTCHA did not verify:" . $resp['msg']);
|
|
30
|
+ exit("\n\nCAPTCHA did not verify: " . $resp['msg']);
|
27
|
31
|
} else {
|
28
|
32
|
exit("\n\nCAPTCHA verified!");
|
29
|
33
|
}
|