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
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)