[英]Is there a way to detect fake domain name of email address? Using Perl, php, javascript?
如果有人知道我們如何檢測電子郵件地址的虛假域名,那將是一個很大的幫助。
請注意,我不想驗證電子郵件。 我想知道電子郵件域名是否存在。
在PHP中有一個函數checkdnsrr
if (checkdnsrr('test.nl', 'A')) // or use ANY or for other see above link
{
echo 'Domain exists';
}
else
{
echo 'Domain does not exist';
}
------------------正在運行的代碼-------
<?php
if (checkdnsrr('google.com', 'A')) // or use ANY or for other see above link
{
echo 'Domain exists';
}
else
{
echo 'Domain does not exist';
}
?>
//Output = Domain exists
//
if (checkdnsrr('fakewebtesting.com', 'A')) // or use ANY or for other see above link
{
echo 'Domain exists';
}
else
{
echo 'Domain does not exist';
}
?>
//Output = Domain does not exists
我希望您從電子郵件中提取域名並在此功能中使用它。
文檔鏈接:
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.