msfz751

get data thru proxy

Mar 17th, 2014
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Private Function gtHttpGet(url As String) As String
  2.     ' TODO oAuth
  3.    Dim ohttp As Object
  4.     'Set ohttp = CreateObject("Microsoft.XMLHTTP")
  5.    Set ohttp = createObject("Msxml2.ServerXMLHTTP.6.0")
  6.     ' use a proxy if defined. Use something like this:
  7.    ' Const myProxy = "11.11.111.1:8181"
  8.    If Not myProxy = "" Then ohttp.setProxy 2, myProxy, ""  
  9.     Call ohttp.Open("GET", url, False)
  10.     Call ohttp.Send("")
  11.     gtHttpGet = ohttp.ResponseText
  12.     Set ohttp = Nothing
  13. End Function
Advertisement
Add Comment
Please, Sign In to add comment