Z
Zuber Vohra
Hi,
I found this code on this group forum.
but I have problem, I just do not want to pull source code.
I want to pull source code by setting User Agent.
Is there a way to get source code by changing User Agent to like iPhone or iPad?
Thanks
Sub Tester()
Range("B2").Value = GetSource("http://www.google.com")
End Sub
Function GetSource(sURL As String) As String
Dim oXHTTP As Object
Set oXHTTP = CreateObject("MSXML2.XMLHTTP")
oXHTTP.Open "GET", sURL, False
oXHTTP.send
GetSource = oXHTTP.responsetext
Set oXHTTP = Nothing
End Function
I found this code on this group forum.
but I have problem, I just do not want to pull source code.
I want to pull source code by setting User Agent.
Is there a way to get source code by changing User Agent to like iPhone or iPad?
Thanks
Sub Tester()
Range("B2").Value = GetSource("http://www.google.com")
End Sub
Function GetSource(sURL As String) As String
Dim oXHTTP As Object
Set oXHTTP = CreateObject("MSXML2.XMLHTTP")
oXHTTP.Open "GET", sURL, False
oXHTTP.send
GetSource = oXHTTP.responsetext
Set oXHTTP = Nothing
End Function