如何将IP转换为URL NAME(主机名)

编程入门 行业动态 更新时间:2024-10-22 15:37:55
本文介绍了如何将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(主机名)

本文发布于:2023-11-01 12:34:53,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1549349.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:转换为   如何将   主机名   IP   URL

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!