在php中有這麼一個函式checkdnsrr來驗證dns是否可訪問來檢測郵箱地址是否存在*/[email protected];
$check_email=checkdnsrr($email,a);
if($check_email){
returntrue;}else{returnfalse;}/*
關於checkdnsrr函式詳細說明
boolcheckdnsrr(string$host[,string$type=mx])
checkdnsrr.檢查指定網址的dns記錄
if(checkdnsrr(round-robin-example.com),all)){
returntrue;}else{
returnfalse;}//buteveryvalueotherthananywillwork
if(checkdnsrr(round-robin-example.com),a)){
returnfalse;}指定的引數host可以是網路位址(ipaddress),也可以用機器名稱(domainname)。引數type可以省略,內定值為mx。而引數type的值可為以下的其中之一:a、mx、ns、soa、ptr、cname或any。
在php中有這麼一個函式checkdnsrr來驗證dns是否可訪問來檢測郵箱地址是否存在*/[email protected];
$check_email=checkdnsrr($email,a);
if($check_email){
returntrue;}else{returnfalse;}/*
關於checkdnsrr函式詳細說明
boolcheckdnsrr(string$host[,string$type=mx])
checkdnsrr.檢查指定網址的dns記錄
if(checkdnsrr(round-robin-example.com),all)){
returntrue;}else{
returnfalse;}//buteveryvalueotherthananywillwork
if(checkdnsrr(round-robin-example.com),a)){
returnfalse;}指定的引數host可以是網路位址(ipaddress),也可以用機器名稱(domainname)。引數type可以省略,內定值為mx。而引數type的值可為以下的其中之一:a、mx、ns、soa、ptr、cname或any。