Download a file from a site with XMLHTTP

wxdqz

New Member
I have an issue and I shall greatly appreciate any help.I have to access a page after login in through another page. I have a loginid and password.After I am in the page I want to be, there are several links for downloadingcsv files and I want to download the file pu50011.csv. I have thefollowing codehttpobj.Open"GET","http://www.moodysqra.com/pubfirm/data/pu50011.csv",false,uid, pwdhttpobj.setRequestHeader "Content-type","text/csv"httpobj.Send()response.write httpobj.statusTextstr = httpobj.responseTextresponse.write httpobj.Statusresponse.write vbNewLineresponse.write strresponse.write str displays the login page itselfthe login page <!-- m --><a class="postlink" href="ishttp://www.moodysqra.com/pubfirm/FormsLogin.asp?/pubfirm/data/Normally">ishttp://www.moodysqra.com/pubfirm/Form ... a/Normally</a><!-- m --> after I login in interactively, I am send to the <!-- m --><a class="postlink" href="pagehttp://www.moodysqra.com/pubfirm/data/where">pagehttp://www.moodysqra.com/pubfirm/data/where</a><!-- m --> there is a link for downloading the file pu50011.csv and the url forthe link <!-- m --><a class="postlink" href="ishttp://www.moodysqra.com/pubfirm/data/pu50011.csv">ishttp://www.moodysqra.com/pubfirm/data/pu50011.csv</a><!-- m --> whichi am specifying in the Open call.I am not sure how to do this right.I really appreciate your helpRegardsAnanda
 
Back
Top