· 7 years ago · Jan 15, 2019, 06:54 AM
1$ch = curl_init($url);
2
3 $data = array(
4 "secret"=> $secret_key,
5 "response" => $response,
6 "remoteip" => $ip );
7
8 curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
9 curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
10 curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
11 curl_setopt($ch, CURLOPT_HEADER, "Content-Type: application/x-www-form-urlencoded");
12
13 $result = curl_exec($ch);
14 curl_close($ch);
15
16
17 var_dump(curl_errno());
18 print_r("<br>");
19 var_dump(curl_error());
20 print_r("<br>");