本文介绍了如何将IP转换为URL NAME(主机名)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好, 如何使用IP地址解析URL名称(主机地址名称). 就像我有一个IP:209.85.231.104 并且我希望它的主机名是(www.google). 谢谢
Hello Everybody, How can i resolve url name (host address name) with the help of IP Address. Such like as i have an ip : 209.85.231.104 and I want its host name means (www.google). Thanks
推荐答案您可以尝试这样的事情; You could try something like this; Dim entry As IPHostEntry = Dns.GetHostEntry("209.85.231.104") Dim hostName As String = entry.HostName
希望这会有所帮助, 弗雷德里克(Fredrik)
Hope this helps, Fredrik
使用此代码 Use this code IPHostEntry IpEntry = Dns.GetHostByAddress(ip); return iphostentry.HostName.ToString();
IP地址主机名转换器 [ ^ ] 希望对您有所帮助.
IP Address Host Name Converter[^] Hope this might help you.
您可以在以下路径中编辑主机文件:c:\ WINDOWS \ system32 \ drivers \ etc \ hosts 通过添加"209.58.231.104 www.google" 但这仅适用于局域网(LAN) you can edit the hosts file in this path: c:\WINDOWS\system32\drivers\etc\hosts by adding "209.58.231.104 www.google" but this only works for the local network (LAN)
更多推荐
如何将IP转换为URL NAME(主机名)
发布评论