您的位置 首页 php

php 邮箱验证函数

function checkEmail($email) { // Create the syntactical validation regular expression $regexp = "^([_a-z0-9-]+)(\.[_a-z0-9-]+)*@([a-z0-9-]+)(\.[a-z0-9-]+)*(\.[a-z]{2,4})$";  // Presume that the email is invalid $valid = 0;  // Validate the syntax if (eregi($regexp, $email)) { list($username,$domaintld) = split("@",$email); // Validate the domain if (getmxrr($domaintld,$mxrecords)) $valid = 1; } else { $valid = 0; }  return $valid; } 
153086660059846ffdcaf68

文章来源:智云一二三科技

文章标题:php 邮箱验证函数

文章地址:https://www.zhihuclub.com/33694.shtml

关于作者: 智云科技

热门文章

网站地图