Get certain text from a webpage [VB.NET]
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.
精彩评论