<!DOCTYPE html>
<html>
<head>
<title>Site submission results</title>
<meta charset="utf-8">
</head>
<body>
<?php
$url = $_REQUEST['url'];
$email = $_REQUEST['email'];
$url = parse_url($url);//返回包含url不同部分的相关数组
$host = $url['host'];//主机
if(!($ip = gethostbyname($host)))
{
echo 'Host for URL does not have valid IP';
exit;
}
echo '主机IP是' . $ip . "<br />";
$email = explode('@', $email);
$emailhost = $email[1];
if(!dns_get_mx($emailhost, $mxhostsarr))
{
echo 'Email address is not valid host';
exit;
}
echo '邮件交换记录';
foreach($mxhostsarr as $mx)
{
echo $mx . ' ';
}
?>
</body>
</html>
php用于检查URL和电子邮件检查
最新推荐文章于 2022-12-15 10:26:03 发布