Jump to content

fsockopen warning message


ghgarcia

Recommended Posts

I use fsockopen to test a user email address before updating my database. However if the address is not valid I get a warning message what I want is not to display the error message since I'm already looking for the address to be valid or not. The following is the code that I use.

[quote]if(checkEmail([email protected]) == FALSE)
{
  echo "E-mail entered is not valid.";
}
else
{
  echo "E-mail entered is valid.";
}
function checkEmail($email)
{
  if(eregi("^[a-zA-Z0-9_]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-\.]+$]", $email))
  {
      return FALSE;
  }

  list($Username, $Domain) = split("@",$email);

  if(getmxrr($Domain, $MXHost))
  {
      return TRUE;
  }
  else
  {
      if(fsockopen($Domain, 25, $errno, $errstr, 30))
      {
        return TRUE;
      }
      else
      {
        return FALSE;
      }
  }
}
[/quote]

I want to display only my text not the warning.

Any help would be greatly appreciated.
Thanks
Link to comment
https://forums.phpfreaks.com/topic/31182-fsockopen-warning-message/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.