note 117880 added to function.checkdnsrr

From: Date: Tue, 25 Aug 2015 22:46:48 +0000
Subject: note 117880 added to function.checkdnsrr
Groups: php.notes 
Request: Send a blank email to php-notes+get-203470@lists.php.net to get a copy of this message
Updated (eregi is deprecated) function to validate an email and a domain. Function allows for either fully-qualified email addresses, or partial address (@gmail.com or gmail.com). Also supports the I18N character conversion. I'm using the function for white/black list content validation: function checkEmailAndDomain($_email) { $exp = "/^(.*)@(.*)$/"; preg_match($exp, $_email, $matches); if (!empty($matches[1]) and (!filter_var($_email, FILTER_VALIDATE_EMAIL))) return (false); return (checkdnsrr(idn_to_ascii($matches[2]), 'MX')); } ---- Server IP: 72.52.91.14 Probable Submitter: 187.184.62.255 ---- Manual Page -- http://php.net/manual/en/function.checkdnsrr.php Edit -- https://master.php.net/note/edit/117880 Del: integrated -- https://master.php.net/note/delete/117880/integrated Del: useless -- https://master.php.net/note/delete/117880/useless Del: bad code -- https://master.php.net/note/delete/117880/bad+code Del: spam -- https://master.php.net/note/delete/117880/spam Del: non-english -- https://master.php.net/note/delete/117880/non-english Del: in docs -- https://master.php.net/note/delete/117880/in+docs Del: other reasons-- https://master.php.net/note/delete/117880 Reject -- https://master.php.net/note/reject/117880 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#203470) next »