privateKey) .'&response='.urlencode($response) .'&remoteip='.urlencode($_SERVER["REMOTE_ADDR"]); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 20); $res = curl_exec($ch); curl_close($ch); if ($res !== false) { @ $res = json_decode($res, true); if (!empty($res['success'])) { return true; } } return false; } }