/ Published in: PHP

This is a slightly hard core email check. I work for clients that want real email addresses. They pay quite a bit of money so yes, I am going to give what they want...
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php // FUNCTION: isValidEmail( $email ) // // return wether an email is valid. // // This is a hard core check cause we check the domain and we even check // that the email is not one of the disposable email places. // // undisposable.net is a great service! // tells wether or not the email you are getting // is a mailinator or other disposable address // // Sorry but when a client pays 40,000 Euros for a web campaign // they want real email addresses. // function isValidEmail( $email ) { // first thing to do is // lets strip out the domain cause we are going to check the domain $checkdomain= $domainname[1]; // check if the filter works, then check that the domain is real { // ok it seems that we have real email address // now lets see if the email is in the disposable // email address lists. $url = "http://www.undisposable.net/services/php/"; if($uns['stat']=='ok') { return ( $uns['email']['isdisposable'] != "yes" ); } else { return false; } } else { return false; } } ?>
Comments
