不知道该怎么做

解决方案 »

  1.   

    查询whois服务器,没啥难度...
      

  2.   

    最简单的思路
    用C# ping一下此域名
      

  3.   

    最简单的思路
    用C# ping一下此域名
      

  4.   

    域名可使用whois服务
    public static string Whois( string Domain, string Ext ) 

    const string cntURLB = "http://panda.www.net.cn/cgi-bin/Check.cgi?domain=";
    const string cntURLM = "&ext="; 
    const string cntMark = "";  
    const string cntTableB = "";  const string cntQn = "此域名不能注册"; 
    const string cntReg = "已被注册的域名"; 
    const string cntNotReg = "未被注册的域名"; 
    const string cntTableR = ""; 
    const string cntTableE = ""; 
    const string cntTable = ""; 
    const string cntAble = "这是一个"; 
    const string cntNotConnect = "不能连接到服务器,请重试!"; 
    string strResult = string.Empty; 
    try 

    string strURL = cntURLB + Domain + cntURLM + Ext; 
    WebRequest wRequest = WebRequest.Create( strURL ); 
    wRequest.Timeout = 30000; 
    WebResponse wResponse = wRequest.GetResponse();//执行请求 
    Stream responseStream = wResponse.GetResponseStream(); 
    StreamReader reader = new StreamReader( responseStream, Encoding.Default ); 
    string responseHTML = reader.ReadToEnd();
    wResponse.Close(); 
    strResult = responseHTML.Substring( responseHTML.IndexOf( cntMark ), responseHTML.IndexOf( cntTableB ) - responseHTML.IndexOf( cntMark ) ); 
    strResult = cntTable + strResult + cntTableR; 
    if( responseHTML.IndexOf( cntQn ) > -1 ) 

    strResult += cntQn + "!" + cntTableE; 

    else if( responseHTML.IndexOf( cntReg ) > -1 ) 

    strResult += cntReg + "!" + cntTableE; 

    else if( responseHTML.IndexOf( cntNotReg ) > -1 ) 

    strResult += cntAble + cntNotReg + "!" + cntTableE; 

    else 

    strResult = responseHTML; 


    catch( WebException ) 

    strResult = cntNotConnect + "\n"; 

    catch( UriFormatException err) 

    strResult = err.Message; 

    return strResult; 

     
    ping不适合,可能还没使用
      

  5.   

    谢谢各位的热心回复和wuyq11朋友
      

  6.   

    http://developer.51cto.com/art/200908/144303.htm