Marc L
Excel Ninja
Still can't reach qualoperadora.net …
… no matter, back to request via qual-operadora !
No protection in fact (despite duplicates ID),
mea culpa, a request header somewhat missing :
… no matter, back to request via qual-operadora !
No protection in fact (despite duplicates ID),
mea culpa, a request header somewhat missing :
Code:
Sub DemoXML2a()
Dim oDoc As Object, oReq As Object
Set oDoc = CreateObject("HTMLFile")
Set oReq = CreateObject("MSXML2.XMLHttp")
VA = [A1].CurrentRegion.Value
Application.StatusBar = " Web download …"
For R& = 2 To UBound(VA)
If VA(R, 2) = "" Or Val(VA(R, 2)) Then
With oReq
.Open "POST", "http://www.qual-operadora.net/", False
.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
.setRequestHeader "DNT", "1"
On Error Resume Next
.send "numero=" & VA(R, 1)
On Error GoTo 0
If .Status = 200 Then
oDoc.body.innerHTML = .responseText
Cells(R, 2).Value = Split(oDoc.forms(1).innerText, vbCrLf & "Quer")(0)
Else
Cells(R, 2).Value = .Status & " : " & .StatusText
MsgBox "#" & .Status & vbLf & vbLf & .StatusText, vbExclamation, " Request error :"
Exit For
End If
End With
End If
Next
Application.StatusBar = False
Set oDoc = Nothing: Set oReq = Nothing
End Sub
With these two last codes, you can compare and learn
using webbrowser inspector tool …
using webbrowser inspector tool …