[英]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.