日期:2014-05-18  浏览次数:20467 次

搜索域名是否被注册
要求和这个网站http://www.onlinenic.com/chinese/chk_domain.html
实现的功能一样,求代码……

语言C#

------解决方案--------------------
贴错了,上面是asp的 你可用HttpWebRequest对象来实现
------解决方案--------------------
用你那个查了一下
我苦想的2个域名原来都被注册了
------解决方案--------------------
一个是sina翻过来 anis
一个是古龙(骨龙SkeletonDragon) 反过来 dragonSkeleton
一个是 四大恶人 4evil.com
------解决方案--------------------
<form id= "Form1 " action= "re.aspx " runat= "server ">
域名: www. <Asp:TextBox id= "txtDomain1 " value= " " runat= "server " />
<Asp:RadioButton id= "txtDomain2 " GroupName= "RadioGroup1 " text= ".com " checked= "True " runat= "server " />
<Asp:RadioButton id= "txtDomain3 " GroupName= "RadioGroup1 " text= ".Net " runat= "server " />
<Asp:RadioButton id= "txtDomain4 " GroupName= "RadioGroup1 " text= ".org " runat= "server " />
<Asp:RadioButton id= "txtDomain5 " GroupName= "RadioGroup1 " text= ".biz " runat= "server " />
<Asp:RadioButton id= "txtDomain6 " GroupName= "RadioGroup1 " text= ".cc " runat= "server " />
<Asp:RadioButton id= "txtDomain7 " GroupName= "RadioGroup1 " text= ".cn " runat= "server " />
<Asp:Button id= "btnQuery " OnClick= "doQuery " text= "查询 " runat= "server " />
<BR> <HR width= "100% "> <BR>
<Asp:label id= "txtResult " ForeColor= "#0000FF " class= "body " runat= "server " />
</form>


using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.IO;
using System.Text;
using System.Net.Sockets;
using System.Net;

public partial class Whois : System.Web.UI.Page
{
String strDomain;
String strServer;
//http://www.china-channel.com/
//whois.pir.org/
//whois.uwhois.com
//whois.internic.net
//whois.crsnic.net
string strserver1 = "whois.uwhois.com ";
string strserver2 = "whois.cnnic.net.cn ";
public void doQuery(Object sender, EventArgs e)
{
if (txtDomain2.Checked)
{
strServer = strserver1;
strDomain = txtDomain1.Text + txtDomain2.Text;
}
if (txtDomain3.Checked)
{
strServer = strserver1;
strDomain = txtDomain1.Text + txtDomain3.Text;

}
if (txtDomain4.Checked)
{
strServer = strserver1;
strDomain = txtDomain1.Text + txtDomain4.Text;
}
if (txtDomain5.Checked)
{
strServer = strserver1;
strDomain = txtDomain1.Text + txtDomain5.Text;
}
if (txtDomain6.Checked)
{
strServer = strserver1;
strDomain = txtDomain1.Text + txtDomain6.Text;
}
if (txtDomain7.Checked)