Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Dim http As New WinHttp.WinHttpRequest
- http.Option(WinHttpRequestOption_EnableRedirects) = False
- url = "http://example.com"
- ' Launch the HTTP request
- http.Open "GET", url, False
- http.Send
- target=http.GetResponseHeaders("location")//get the target url for post
- Cookie=""
- postData="USER="&HttpUtility.UrlEncode(username)&"&PASSWORD="&password
- http.Open "POST", target, False
- http.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
- http.setRequestHeader "Cookie", Cookie
- http.Send postData
Add Comment
Please, Sign In to add comment