域检查器(哪个)? [英] Domain Checker(whois)?
问题描述
大家好.
我在此网页中使用带有C#语言的asp.net开发了一个网页
我有一个文本框,用于获取域和按钮的网址.当用户
在文本框中输入域名,然后按
的详细信息按钮
该域将显示在另一个窗口中.我从代码项目"用户那里得到帮助,我得到了代码,它工作正常,但是当我
键入域名,尤其是".in"域不提供详细信息.
只是显示域可用消息而实际上显示的是域
注册,例如,我在页面中尝试了"axisbank.co.in",这是
显示该域可用,但实际上已被占用.我
正在发送我的代码,请帮助我(尤其是.in域名)
Hi, to all.
i developing a webpage using asp.net with c# language, in this webpage
i have a textbox for taking url of the domain and button. when user
enter domain name in the textbox and press the button the details of
the domain will displaying in the other window. i take help from ''the code project'' user and i get the code it is working fine, but when i
type the domain name particularly ".in" doamins are not giving details.
simply domain available message is displaying actually the domain is
registered for example i tried "axisbank.co.in" in my page it is
displaying the domain is available but actually it is already taken. I
am sending my code please help me ( particularly .in domain names)
protected void btn_click(object sender,Event Args e)
{
// lblDomainName.Text = Session["WhoIs"].ToString();
string firstLevelbufData = null;
// Stores the bufData extracted from the webclient
try
{
// similarly we can select any server address for bufData mining
string strURL = "http://www.directnic.com/whois/index.php?query=" + txtDomain.Text;
WebClient web = new WebClient();
// byte array to store the extracted bufData by webclient
byte[] bufData = null;
bufData = web.DownloadData(strURL);
// got the bufData now convert it into string form
firstLevelbufData = Encoding.Default.GetString(bufData);
}
catch (System.Net.WebException ex)
{
// this exception will be fired when the host name is not
//resolved or any other connection problem
//txtResult.Text = ex.Message.ToString();//sasi
lblresult.Text = ex.Message.ToString();
return;
}
try
{
// first and last are the regular expression string for
//extraction bufData witnin two tags
// you can change according to your requirement
string first = null;
string last = null;
// chr(34) is used for (") symbol
first = "<p class=\"text12\">";
last = "</p>";
Regex RE = new Regex(first + "(?<MYDATA>.*?(?=" + last + "))",
RegexOptions.IgnoreCase | RegexOptions.Singleline);
// try to extract the bufData within the first and last tag
Match m = RE.Match(firstLevelbufData);
// got the result
//txtResult.Text = m.Groups["MYDATA"].Value + "<br>";//sasi
lblresult.Text = m.Groups["MYDATA"].Value + "<br>";
// check if no information abour that domain is available
//if (txtResult.Text.Length < 10) txtResult.Text =
//"Domain "+ txtDomain .Text +" is Available";//sasi
if (lblresult.Text.Length < 10)
lblresult.Text = "Domain " + txtDomain.Text+ " is Available";
}
catch (System.Net.WebException ex)
{
lblresult.Text = " Sorry the information is currently not available !! ";
}
}
帮帮我,谢谢你
[修改:添加的代码格式]
Help me thank u
[Modified: added code formatting]
推荐答案
实施此API, [< ^ ].这在.in域名中效果很好,每天没有100个查询是免费的.
Implement this API, [^]. This works well for .in domains and there is no fee for 100 queries per day.
Hi
只需尝试url
Hi
Just try the url
http://www.directnic.com/whois/index.php?query=axisbank.co.in
http://www.directnic.com/whois/index.php?query=axisbank.co.in
给出的结果为对不起,但我们的WHOIS不支持顶级域名"
您正在使用的网站不支持.co.in域类型.
its giving the result as "Sorry, but our WHOIS does not support the top level domain name"
The site you are using do not support .co.in domain type.
因此,您需要搜索支持主要域类型的API.
So, you need to search for API, which support major domain types.
这篇关于域检查器(哪个)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!