html file redirects to php page called index.php and index.php is a recaptcha php file from google
<?php
require_once "recaptchalib.php";
// Register API keys at https://www.google.com/recaptcha/admin
$siteKey = "*";
$secret = "*";
// reCAPTCHA supported 40+ languages listed here: https://developers.google.com/recaptcha/docs/language
$lang = "en";
// The response from reCAPTCHA
$resp = null;
// The error code from reCAPTCHA, if any
$error = null;
$reCaptcha = new ReCaptcha($secret);
// Was there a reCAPTCHA response?
if ($_POST["g-recaptcha-response"]) {
$resp = $reCaptcha->verifyResponse(
$_SERVER["REMOTE_ADDR"],
$_POST["g-recaptcha-response"]
);
}
if ($resp != null && $resp->success) {
require_once 'gmail.php';
}else{
header('Location: ../failed.html');
}
?>
When page loads it shows that the page took too long to respond. The webaddress is still example.com/php/index.php. I've done this on xampp and another website and it works. What could possibly be the reason? Do I need to contact the webhost?
is there are a way to know where in line of code the error occured?
edit: It has my siteKey and secretkey . I removed it in this case