开发者

Get certain text from a webpage [VB.NET]

开发者 https://www.devze.com 2023-01-31 19:34 出处:网络
What I\'m looking to acquire is ip addresses from a webpage which contains the information. Example page: http://www.game-monitor.com

What I'm looking to acquire is ip addresses from a webpage which contains the information. Example page: http://www.game-monitor.com I'm basi开发者_如何转开发cally looking how to make vb.net visit that webpage and save the IP Addresses it gets from that webpage. Thanks!


Check the System.Net.NetworkInformation for the Ping method. You can ping the hostname and return the IP to a variable.

Dim ping as Ping = New Ping()
Dim pingReply as PingReply = ping.send("www.game-monitor.com")

Dim ip as String = PingReply.Address.ToString()

Edit, you might want to add a try catch in case the ping doesn't get a reply.

0

精彩评论

暂无评论...
验证码 换一张
取 消