替换网址,自己找你要的数据。
Dim XMLH As Object
XMLH = CreateObject("Microsoft.XMLHTTP")
XMLH.open("GET", "http://api.kuaidi100.com/api?id=xxxxxxxxxxxxx&com=tiantian&nu=11111&show=0&muti=1&order=desc", True)
XMLH.send(Nothing)
Do While XMLH.readyState <> 4
Application.DoEvents
Loop
Dim json As String = XMLH.responseText
Dim ScriptControl As Object, data As Object, JscriptCode As String
JscriptCode = "function toObject(json) {eval(""var o=""+json);return o;}"
ScriptControl = CreateObject("MSScriptControl.ScriptControl")
With ScriptControl
.Language = "Javascript"
.Timeout = -1
.AddCode(JscriptCode)
data = .Run("toObject", json)
End With
MessageBox.Show(data.message)
MessageBox.Show(data.status)
http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=23398&authorid=0&page=0&star=1 lin_hailun 写的