yami007 Posted March 20, 2009 Share Posted March 20, 2009 i read tutorial on sitepoint.com >> here the function checkdnsrr(); works great. i just dont know where the problem is. it always echo : nope - invalid email! here is the code i'm using right now : <?php if (checkdnsrr("[email protected]","MX")) echo "yup - valid email!"; else echo "nope - invalid email!"; ?> the email is mine.. so it's not the problem ^^ hope to find an answer Link to comment https://forums.phpfreaks.com/topic/150330-solved-problem-with-checkdnsrr-function/ Share on other sites More sharing options...
rhodesa Posted March 20, 2009 Share Posted March 20, 2009 you need to strip off the username part...so it's just this hostname Link to comment https://forums.phpfreaks.com/topic/150330-solved-problem-with-checkdnsrr-function/#findComment-789501 Share on other sites More sharing options...
yami007 Posted March 20, 2009 Author Share Posted March 20, 2009 i dont understand, please explain or would u rewrite the code? Link to comment https://forums.phpfreaks.com/topic/150330-solved-problem-with-checkdnsrr-function/#findComment-789505 Share on other sites More sharing options...
premiso Posted March 20, 2009 Share Posted March 20, 2009 $email = "[email protected]"; list($user, $host) = explode("@", $email); if (checkdnsrr($host,"MX")) { Link to comment https://forums.phpfreaks.com/topic/150330-solved-problem-with-checkdnsrr-function/#findComment-789508 Share on other sites More sharing options...
yami007 Posted March 20, 2009 Author Share Posted March 20, 2009 thanks guys ^^ Link to comment https://forums.phpfreaks.com/topic/150330-solved-problem-with-checkdnsrr-function/#findComment-789516 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.