check_email_address('test@example.org')) { // Email address is technically valid } */ class EmailAddressValidator { public function check_email_address($strEmailAddress) { // If magic quotes is "on", email addresses with quote marks will // fail validation because of added escape characters. Uncommenting // the next three lines will allow for this issue. //if (get_magic_quotes_gpc()) { // $strEmailAddress = stripslashes($strEmailAddress); //} // Control characters are not allowed if (preg_match('/[\x00-\x1F\x7F-\xFF]/', $strEmailAddress)) { return false; } // Split it into sections using last instance of "@" $intAtSymbol = strrpos($strEmailAddress, '@'); if ($intAtSymbol === false) { // No "@" symbol in email. return false; } $arrEmailAddress[0] = substr($strEmailAddress, 0, $intAtSymbol); $arrEmailAddress[1] = substr($strEmailAddress, $intAtSymbol + 1); // Count the "@" symbols. Only one is allowed, except where // contained in quote marks in the local part. Quickest way to // check this is to remove anything in quotes. $arrTempAddress[0] = preg_replace('/"[^"]+"/' ,'' ,$arrEmailAddress[0]); $arrTempAddress[1] = $arrEmailAddress[1]; $strTempAddress = $arrTempAddress[0] . $arrTempAddress[1]; // Then check - should be no "@" symbols. if (strrpos($strTempAddress, '@') !== false) { // "@" symbol found return false; } // Check local portion if (!$this->check_local_portion($arrEmailAddress[0])) { return false; } // Check domain portion if (!$this->check_domain_portion($arrEmailAddress[1])) { return false; } // If we're still here, all checks above passed. Email is valid. return true; } /** * Checks email section before "@" symbol for validity * @param strLocalPortion Text to be checked * @return True if local portion is valid, false if not */ protected function check_local_portion($strLocalPortion) { // Local portion can only be from 1 to 64 characters, inclusive. // Please note that servers are encouraged to accept longer local // parts than 64 characters. if (!$this->check_text_length($strLocalPortion, 1, 64)) { return false; } // Local portion must be: // 1) a dot-atom (strings separated by periods) // 2) a quoted string // 3) an obsolete format string (combination of the above) $arrLocalPortion = explode('.', $strLocalPortion); for ($i = 0, $max = sizeof($arrLocalPortion); $i < $max; $i++) { if (!preg_match('.^(' . '([A-Za-z0-9!#$%&\'*+/=?^_`{|}~-]' . '[A-Za-z0-9!#$%&\'*+/=?^_`{|}~-]{0,63})' .'|' . '("[^\\\"]{0,62}")' .')$.' ,$arrLocalPortion[$i])) { return false; } } return true; } /** * Checks email section after "@" symbol for validity * @param strDomainPortion Text to be checked * @return True if domain portion is valid, false if not */ protected function check_domain_portion($strDomainPortion) { // Total domain can only be from 1 to 255 characters, inclusive if (!$this->check_text_length($strDomainPortion, 1, 255)) { return false; } // Check if domain is IP, possibly enclosed in square brackets. if (preg_match('/^(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])' .'(\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])){3}$/' ,$strDomainPortion) || preg_match('/^\[(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])' .'(\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])){3}\]$/' ,$strDomainPortion)) { return true; } else { $arrDomainPortion = explode('.', $strDomainPortion); if (sizeof($arrDomainPortion) < 2) { return false; // Not enough parts to domain } for ($i = 0, $max = sizeof($arrDomainPortion); $i < $max; $i++) { // Each portion must be between 1 and 63 characters, inclusive if (!$this->check_text_length($arrDomainPortion[$i], 1, 63)) { return false; } if (!preg_match('/^(([A-Za-z0-9][A-Za-z0-9-]{0,61}[A-Za-z0-9])|' .'([A-Za-z0-9]+))$/', $arrDomainPortion[$i])) { return false; } } } return true; } /** * Check given text length is between defined bounds * @param strText Text to be checked * @param intMinimum Minimum acceptable length * @param intMaximum Maximum acceptable length * @return True if string is within bounds (inclusive), false if not */ protected function check_text_length($strText, $intMinimum, $intMaximum) { // Minimum and maximum are both inclusive $intTextLength = strlen($strText); if (($intTextLength < $intMinimum) || ($intTextLength > $intMaximum)) { return false; } else { return true; } } } $errmsg = array(); $msg = ""; if ($_POST['op']=="validate") { // lets do the basic email form safety checks foreach($_REQUEST as $x) { if(preg_match("/Content-Type|cc:|bcc:|fcc:|to:|from:|subject:|x0A|x0D|%0A|%0D/i",$x)) { exit; } //Block link stuffing... We'll allow <10 links for now $count= substr_count(strtolower($x),'http://'); if($count >=10) { exit; } $count2= substr_count(strtolower($x),'href='); if($count2 >=10) { exit; } } if($_SERVER['REMOTE_ADDR']=="") { exit; } if (!preg_match("/foolproofupdoing.com/i",$_SERVER['HTTP_REFERER'])) { exit; } // now lets do some validation $validator = new EmailAddressValidator; if (!$validator->check_email_address($_POST['email'])) { $errmsg[] = 'There was a problem with your email address. Please double check it and try again.'; } if ($_POST['msg'] == '') { $errmsg[] = 'Please enter in a message.'; } if (empty($errmsg)) { // no errors lets send the mail $msgstr = "A visitor to foolproofupdoing.com has sent you the following message:\n\n". "Email Address: ".$_POST['email']."\n". "Message: ".$_POST['msg']; mail("amy@foolproofupdoing.com","Contact Form submission from foolproofupdoing.com",$msgstr); //mail("jj@jmichaelstudiophotography.com","Contact Form submission from foolproofupdoing.com",$msgstr); mail("amy@nicoproductions.com","Contact Form submission from foolproofupdoing.com",$msgstr); $msg = 'Thanks! Your message has been sent.'; $msg = '
'.$msg.'
'; } else { foreach($errmsg as $msgtxt) { $msg .= "- $msgtxt
\n"; } $msg = '
'.$msg.'
'; } } ?> Give Us a Call. We Would love to hear from you.
Navigation Home About Laterst Raves Education Order DVD's Photos Blog Contacts
       
 

Amy Colvin Concepts        
Fremont, OH 43420

Phone:   419-346-7699
     

 

 

Email

Please use the form below to contact us via email.
* = required field.

* Name: (Your Name)
* From: (Your email address)
* Message:
  Please make sure your entry is accurate and complete before clicking Send.
   
   
   
   
 
 
Client Testimonials
"Updo Your Earnings With Updos"
" Bring Passion Back to Updos"
"Turn Your Service Into a Client Experience"
"Braids Braids And More Braids"
"Updo Educator Amy Colvin"
"Salon Education Through the Web"
 
Come see Amy at Hair Chiasso.
 
Located at
3421 Briarfield
Maumee, Ohio
419.491.0996
 
   
   
     
     
     
         
         
Order DVD'sEducationHomeAbout UsLatest RavesPhotosBlogContact Us privacy