php 郵箱驗證函數
知識
07-06
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;
}
※關於C插件編程和插件宿主數據傳遞的一些方法
※jsp頁面內嵌另一個jsp公共頁面
TAG:程序員小新人學習 |