I was able to produce this same error with an invalid email address supplied to the function. If I gave it a valid msu.edu address it doesn't return an error. Are you getting the error when running the function against something you know is valid? -Matt On Apr 29, 2009, at 2:44 PM, Renee Starkey wrote: > Hello > > I am trying to use fsockopen() php function to check a valid email > address. Here is a code snippet: > > 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; > } > } > } > Here is the error from the browser: > > Warning: fsockopen() [function.fsockopen]: php_network_getaddresses: > getaddrinfo failed: Name or service not known in file name line... > > Here is the failing on the if(fsockopen($Domain,25,$errno,$errstr, > 30)) line. Does anyone out there have any experience with this > error?? I am using a LAMP server. > > Thank you, > > Renee Starkey @}-----}----- > Information Technologist I > 115 Old Horticulture > Language Learning Center, Michigan State University > Phone: 517-355-7587 > > > Renee Starkey ;-) > "Strive to be the best you can be at any given moment in life" RmS >