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("cool_yami_007@hotmail.com","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 Quote 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 Quote 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? Quote 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 = "cool_yami_007@hotmail.com"; list($user, $host) = explode("@", $email); if (checkdnsrr($host,"MX")) { Quote 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 ^^ Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.