<?php
class GetInfo{
    //銮峰彇链嶅姟鍣ㄧ増链?    function GetServerInfo($url){
            $url = parse_url($url);
            $fp = @fsockopen($url['host'],empty($url['port'])?80:$url['port'],$error);
            if($fp){
                    fputs($fp,"GET ".(empty($url['path'])?'/':$url['path'])." HTTP/1.1\r\n");
                    fputs($fp,"Host:$url[host]\r\n\r\n");
                    $tmp="";
                    while(!$end){
                            $line = fgets($fp,2048);
                            if(trim($line)=="")
                                    $end=true;
                            else
                                    $tmp=$tmp."<br />".$line;
                    }
                    return $tmp;
            }else{
                    return null;
            }
    }
    //銮峰彇鍩熷悕IP
    function GetDomainIp($url){
            return gethostbyname($url);
    }
}
