I have the code below, it gives an error; could not open socket. i thought it was a server problem but ive tried two of my servers, is there any problem with my code:
<?php
require_once('recaptchalib.php');
$fname = $_GET['fname'];
$lname = $_GET['lname'];
$subject = $_GET['subject'];
$to = "---------------------";
$sub = "--------------------";
$what = $_GET['what'];
$body = $fname . "<br />" . $lname . "<br />" . $subject . "<br />" . $what . "<hr />";
$headers = 'Content-type: text/html';
$privatekey = "-------------------------------------------";
$resp = recaptcha_check_answer ($privatekey,
$_SERVER["REMOTE_ADDR"],
$_POST["recaptcha_challenge_field"],
$_POST["recaptcha_response_field"]);
if (!$resp->is_valid) {
// What happens when the CAPTCHA was entered incorrectly
die ("<center>The reCAPTCHA wasn't entered correctly. Go back and try it again." .
"(reCAPTCHA said: " . $resp->error . ")</center>");
} else {
mail($to, $sub, $body, $headers);
echo "<h1>Sending Succesful</h1><p>You Will Recieve A Reply Within 24 Hours</p><p><a href='javascript:history.back();'>Click Here To Go Back</a></p>";
}
?>