使用网站网址查找IP地址 [英] find IP address using website URL

查看:89
本文介绍了使用网站网址查找IP地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在尝试使用带有vb代码的asp.net下的网站URL查找IP地址.例如

dim str as String ="www.codeproject.com"

使用该字符串值,我需要找到它的IP地址.任何人都可以告诉我找到解决方案的方法.

任何答复都将不胜感激..

问候,

sasi

Hi,

I am trying to find an IP address using the website URL under the asp.net with vb code. for example

dim str as String = "www.codeproject.com"

using that string value i need to find an IP address of it. anyone can tell me the way to find the solutions for that..

any replies could be appreciated..

regards,

sasi

推荐答案

http://www.w3schools.com/asp/coll_servervariables.asp [ ^ ]
http://www.mikesdotnetting.com/Article/103/Build-your-own-Whois-Lookup-with-ASP.NET-and-jQuery [
http://www.w3schools.com/asp/coll_servervariables.asp[^]
http://www.mikesdotnetting.com/Article/103/Build-your-own-Whois-Lookup-with-ASP.NET-and-jQuery[^]


尝试使用类型System.Net名称空间中的Dns:

Try it using type Dns from the System.Net namespace:

String codeProjectHost = "www.codeproject.com";
IPAddress[] ips = Dns.GetHostAddresses(codeProjectHost);

foreach (IPAddress ip in ips)
{
    Console.WriteLine(ip.ToString());
}




干杯!

—MRB




Cheers!

—MRB


检查以下内容:

http://l33ts.org/forum/Thread-VB-NET-Get- Website-s-IP-Address [ ^ ]

http://www.devasp.net/net/articles/display/273.html [ ^ ]

希望对您有所帮助:)
check these out:

http://l33ts.org/forum/Thread-VB-NET-Get-Website-s-IP-Address[^]

http://www.devasp.net/net/articles/display/273.html[^]

hope it helps :)


这篇关于使用网站网址查找IP地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆