返回列表 发帖
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 'adTypeBinary
        .Open
        .Write arrByte
        .Position = 0
        .Type = 2 'adTypeText
        .Charset = "GB2312"
        ByteToStr = .Readtext
        .Close
    End With
End FunctionCOPY

TOP

strText = Replace(strText,"</li><li>",vbCr)
改成
strText = Replace(strText,"</li><li>",vbtab)
1

评分人数

TOP

返回列表