v2.5.2
Giriş yap

HTTP request failed! HTTP/1.1 404 Not Found nasıl çözebilirim?

bukr3j
420 defa görüntülendi ve 1 kişi tarafından değerlendirildi
if (isset($_POST['g-recaptcha-response'])) {
    //domain' i localhost olarak ayarladım sıkıntı yok
    $secretkey = "6LcWnSwgAAAAALptubnZCnTp2KKi4a1BSNWzRf98";
	$ip = $_SERVER['REMOTE_ADDR'];
	$response = $_POST['g-recaptcha-response'];
	$url = "https://www.google.com/recaptcha/api/siteverify=secret=$secretkey&response=$response&remoteip=$ip";
	$fire = file_get_contents($url);
	echo $url;
}
else {
	echo "ReCaptcha Error";
}

Formumda ReCaptha kontrolu yapmak için bir videoya baktım, onun yaptığı gibi yaptım ama bende böyle bir hata çıktı. Bu hatayı nasıl çözebilirim?

nuclearflux
647 gün önce

Dikkatli bakarsanız request attığınız url'de hata var.
https://www.google.com/recaptcha/api/siteverify den sonra ? işareti eksik. Sorgu ulaşmıyor.

Url'yi şununla değiştirin;
https://www.google.com/recaptcha/api/siteverify?secret=$secretkey&response=$response&remoteip=$ip