<?php
if (!$fp = fsockopen("mail.atyu30.com",25))
{
echo "无法连接mail server!";
echo "Domain Name of [10.0.0.100]:";
echo gethostbyaddr("10.0.0.100");//返回"atyu30.com",返回某个IP的Domain Name ,若执行失败则返回原来的IP
echo "IP of [www.atyu30.com]:";
echo gethosbyname("www.atyu30.com");//返回10.0.0.100,返回某个Domain Name 的IP