Germaris Posted August 22, 2007 Share Posted August 22, 2007 Hi there! In a registration form, I have an input field for entering the email address. How do I use, in the verification process of the form, the getmxrr function to verify if the proposed email address really exists? Many thanks in advance for any help! Quote Link to comment Share on other sites More sharing options...
NArc0t1c Posted August 22, 2007 Share Posted August 22, 2007 Why not use fsockopen on the host on port 21(mail server)? Quote Link to comment Share on other sites More sharing options...
Germaris Posted August 22, 2007 Author Share Posted August 22, 2007 Hi! Listen: I really am a junior in PHP. Excuse me, but what you mentioned is like chinese for me! Could you explain, please? Thanks. PS : I believed port 21 was a ftp Port... Quote Link to comment Share on other sites More sharing options...
NArc0t1c Posted August 22, 2007 Share Posted August 22, 2007 Oh. yes, 25. : ) Here is an example of what I mean by using fsockopen to check the mail server, <?php // $Email will be the email address. function CheckEmail($Email) { if (empty($Email)) { return false; } else { list($UserEmail, $MailServer) = explode('@', $Email); unset($UserEmail); $Connection = fsochopen($MailServer, 25, $errno, $errstr, 30); if (empty($Connection)) { echo 'The email address you entered is not valid.'; return false; } else { return true; } } ?>/code] Quote Link to comment 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.