VB获取本机公网IP源码
Function HttpGet(url) With CreateObject("Msxml2.ServerXMLHTTP") .open "GET", url, False .send HttpGet = .responseText End With End Function Private Sub Command1_Click() a = HttpGet("http://20140507.ip138.com/ic.asp") a = Split(a, "[") a = a(1) a = Split(a, "]") a = a(0) MsgBox a a = HttpGet("http://wap.ip138.com/ip_search138.asp?ip=" & a) a = Split(a, "<br/><b>查询结果:") a = a(1) a = Split(a, "</b><br/>") a = a(0) MsgBox a End Sub