| Dim strText | | with CreateObject("MSXml2.xmlhttp") | | .Open "GET","http://www.ip138.com/ips138.asp?ip=www.baidu.com&action=2",false | | .Send | | strText = ByteToStr(.Responsebody) | | end with | | strText = Split(Split(strText,"<td align=""center""><ul class=""ul1""><li>")(1),"</li></ul></td>")(0) | | strText = Replace(strText,"</li><li>",vbCr) | | MsgBox strText | | WScript.Quit | | | | Function ByteToStr(ByVal arrByte) | | With CreateObject("Adodb.Stream") | | .Type = 1 | | .Open | | .Write arrByte | | .Position = 0 | | .Type = 2 | | .Charset = "GB2312" | | ByteToStr = .Readtext | | .Close | | End With | | End FunctionCOPY |
|