I have code similar to the following. The returned page is the logged in page as expected. However, no cookies are returned in the header which is:
Date: Mon, 19 Mar 2012 10:58:03 GMT Server: Apache/2.0.64 (Unix) mod_ssl/2.0.64 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 X-Powered-By: PHP/5.2.9 Keep-Alive: timeout=15, max=100 Connection: Keep-Alive Transfer-Encoding: chunked Content-Type: text/html
I really want to return the cookies and their values. Any idea why this is not working?
set xmlObj = Server.CreateObject("Microsoft.XMLDOM")
Set xmlHTTP = Server.CreateObject("Msxml2.ServerXMLHTTP.6.0")
xmlHTTP.Open "POST","http://www.domain.com/",false
xmlHTTP.SetRequestHeader "Content-type", "application/x-www-form-urlencoded"
xmlhttp.setrequestheader "Cookie","cookie2=boom"
xmlhttp.setrequestheader "Cookie","cookie1=dummy"
xmlHTTP.Send "username=xxxxx&action=Login&password=yyyyy"
strheaders=xmlhttp.getallresponseheaders()
response.write "<p>" & (strheaders) & "</p>"
response.write (xmlHTTP.ResponseText)
Select all Open in new window
Open in new window