Fields shown by are required.

Your IP : '. $visitor_ip .''; $hdshake .= '
  • Your eMail : '.$Email.'
  • '; echo '
      '. $hdshake .'
    '; if( !empty($Email) ){ list($emailPart, $domainPart) = explode('@', $Email); $one=filter_var($Email, FILTER_VALIDATE_EMAIL); $two=MailIPAddress($domainPart); if (!(($one) && ($two))) { $error .= '
  • Email is invalid .
  • '; echo '
      '. $error .'
    '; exit(); } } $error .= ( empty($Name) ) ? '
  • Please enter your name.
  • ' : null; $error .= ( empty($Email) ) ? '
  • Blank Email is not accepted.
  • ' : null; $error .= ( empty($Message) ) ? '
  • Please enter some comments or questions.
  • ' : null; $resp = recaptcha_check_answer ($privatekey, $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]); $error .= ( !($resp->is_valid) ) ? '
  • The captcha code entered is incorrect .
  • ' : null; if (!empty($error)) { // What happens when the CAPTCHA was entered incorrectly echo '
      '. $error .'
    '; exit(); } //Next send contact to website admin. $EmailToAdmin = "carlo.dj@messiahpsychoanalyst.org"; //Put your website admin email here. Don't forget quotes. // body of the email your own admin receives $Body = "RE: Contact from visitors"; $Body .= "\n"; $Body .= "Name: "; $Body .= $Name; $Body .= "\n"; $Body .= "City: "; $Body .= $City; $Body .= "\n"; $Body .= "Subject: "; $Body .= $Subject; $Body .= "\n"; $Body .= "Email: "; $Body .= $Email; $Body .= "\n"; $Body .= "Visitor's IP: "; $Body .= $visitor_ip; $Body .= "\n"; $Body .= "Message: "; $Body .= "\n"; $Body .= $Message; $Body .= "\n"; // send email to admin $posted = mail($EmailToAdmin, $Subject, $Body, "From: <$Email>"); // redirect to thanks page if ($posted){ echo '

    Thanks By Dysprosium


    Your message has been sent! Thanks for Your Message!

    Click to go to Home page!

    '; //After thank you send an email containing his message to the visitor // prepare email body text $Body = " Madam/Sir,\n Thank you for your message.\n Dysprosium.\n"; $Body .= " ======================================================\n\n"; $Body .= "Name: "; $Body .= $Name; $Body .= ", Esq."; $Body .= "\n"; $Body .= "From: "; $Body .= $City; $Body .= "\n"; $Body .= "Email: "; $Body .= $Email; $Body .= "\n"; $Body .= "Subject: "; $Body .= $Subject; $Body .= "\n"; $Body .= "Message: "; $Body .= "\n"; $Body .= $Message; $Body .= "\n"; // send email mail($Email, $Subject, $Body, "From: <$EmailToAdmin>"); } } else{ $ip_file = 'save_ip.txt'; $date_ti = date('Y-m-d H:i:s'); if (file_exists($ip_file)) { $file_content = file_get_contents($ip_file); file_put_contents($ip_file, $file_content . "\r\n" . $date_ti . "\t||\t" . $visitor_ip); } else {//create text file and put header for the table file_put_contents($ip_file, "Date and Time" . "\t||\t" . "Visitors IPs" . "\r\n" . $date_ti . "\t||\t" . $visitor_ip); } echo '
      Your IP : '. $visitor_ip .'
    '; } ?>