v2.5.2
Giriş yap

ReCaptcha Sorunu

Anonim
2,158 defa görüntülendi ve 2 kişi tarafından değerlendirildi

Merhabalar değerli arkadaşlar.
Localimde sorunsuz bir şekilde çalıştırabiliyorum ama hostuma attığımda çalışmıyor.
Her ikisi için ayrı anahtarım var.Web sitem için www. ekleyerek alıyorum.Almadan da denedim
ama bir faydası olmadı maalesef

Kodlarım;

if (isset($_POST['uyegiris'])) {

	$url = "https://www.google.com/recaptcha/api/siteverify";
	$key = "6LfhcLkUAAAAAJZJRrxffHZFG-ykuHSZnQcEfSie";
	$value = $_POST["g-recaptcha-response"];
	$ip = $_SERVER["REMOTE_ADDR"];

	$adres = $url . "?secret=" . $key . "&response=" . $value . "&remoteip=" . $ip;
	$gonder = file_get_contents($adres);
	$json = json_decode($gonder, true);

	if ($json['success']) {

		$uye_eposta = htmlspecialchars(trim($_POST['uye_mail']));
		$uye_sifre  = htmlspecialchars(trim(md5($_POST['uye_sifre'])));

		if ($uye_eposta && $uye_sifre) {

			$uyesor = $db->prepare("SELECT * from uye where uye_mail=:eposta and uye_sifre=:sifre");
			$uyesor->execute(
				array(
					'eposta' => $uye_eposta,
					'sifre'  => $uye_sifre
				)
			);
			$uyesorprint = $uyesor->fetch(PDO::FETCH_ASSOC);

			$say = $uyesor->rowCount();

			if ($say > 0) {

				$_SESSION['uye_mail'] = $uyesorprint['uye_mail'];
				$_SESSION['uye_ad']   = $uyesorprint['uye_ad'] . $uyesorprint['uye_soyad'];

				if ($_GET['sepet'] == 'ok') {
					header('Location:../sepet');
				} else {
					header('Location:../index.php');
				}
			} else {

				header('Location:uye-girisi?durum=no');
			}
		}
	} else {

		header('Location:uye-girisi?bot=no');
	}
}
myrioos
1644 gün önce

Ne demek hocam, iyi çalışmalar.