Hi ,
I need a batch script which automatically retrieves data from the webpage when we run the script.
The webpage is constant only one login was enough the values changes and are not constant.
I used using inet
Option Explicit
Private Sub Command1_Click()
Dim url As String
Dim avgRstime As String
Dim tempStr As String
Dim i As Long
Dim p As Long
url = ""http://54.215.11.234:9080/controlcenter/monitor/operation/getSummary.do?domain=Production&application=Nike_APIProxy&service=Nike_Plus&endpoint=v2_me&addressTy pe=client&operation=sync""
tempStr = Inet1.OpenURL(url)
Do While Inet1.StillExecuting
DoEvents
Loop
i = InStr(tempStr, "<td class=""activeVersionLabel""><STRONG>Avg Resp Time (msec)</STRONG></td>")
i = i + Len("<td class=""activeVersionLabel""><STRONG>Avg Resp Time (msec)</STRONG></td>")
i = i + Len("<TD class=activeVersionLabel>")
p = InStr(i, tempStr, "</")
avgRstime = Mid(tempStr, i, p - i)
MsgBox "Avg Resp Time is " & avgRstime
End Sub
Please let me know if any needed
I need a batch script which automatically retrieves data from the webpage when we run the script.
The webpage is constant only one login was enough the values changes and are not constant.
I used using inet
Option Explicit
Private Sub Command1_Click()
Dim url As String
Dim avgRstime As String
Dim tempStr As String
Dim i As Long
Dim p As Long
url = ""http://54.215.11.234:9080/controlcenter/monitor/operation/getSummary.do?domain=Production&application=Nike_APIProxy&service=Nike_Plus&endpoint=v2_me&addressTy pe=client&operation=sync""
tempStr = Inet1.OpenURL(url)
Do While Inet1.StillExecuting
DoEvents
Loop
i = InStr(tempStr, "<td class=""activeVersionLabel""><STRONG>Avg Resp Time (msec)</STRONG></td>")
i = i + Len("<td class=""activeVersionLabel""><STRONG>Avg Resp Time (msec)</STRONG></td>")
i = i + Len("<TD class=activeVersionLabel>")
p = InStr(i, tempStr, "</")
avgRstime = Mid(tempStr, i, p - i)
MsgBox "Avg Resp Time is " & avgRstime
End Sub
Please let me know if any needed