By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,828 Members | 801 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,828 IT Pros & Developers. It's quick & easy.

Download web page from URL (with redirect) to a text file with vb.net

P: n/a
Hi everyone,

i tried a lot but i don't seem to be able to do anything conclusive !

Here what i want to do :

LogIn in a webpage using this URL :

http://movies.hsx.com/servlet/Login?...&password=1242

and download the source page in a txt file that i could save on my
computer.

I have tried with HttpWebRequest, WebRequest,
AllowAutoRedirect=true...etc....

nothing works...all that it downloads is a source page where it says
Please LogIn...but where i use this URL in a browser...it shows me the
correct page and i can save manually the source code of the page.

Can someone attemp to crack this problem ?

I don't need anything fancy...only something that i can put a URL and
a save file path...thats it.

Thank you very much...!

I've put so many hours on this....

Martin

Mar 18 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
When I clicked on the link you provided I got the login page. My guess
is that you have a cookie on your computer from the last time you
entered a username and password and that is why you do not get the
login screen when you use your browser. You can use the WebBrowser
control to accomplish what you want, but it is a bit cumbersome. It
allows you to post the username and password in code so the webbrowser
will automatically go to the next page.
I have used it to login to Yahoo and retrieve my mail without having
to type in anything.
The html source is loaded into a document object which you can then
save to a file. Read up on the Webbrowser Control at msdn. You should
also find some good articles on its use if you search Google.

On Mar 18, 2:57 pm, mor...@hotmail.com wrote:
Hi everyone,

i tried a lot but i don't seem to be able to do anything conclusive !

Here what i want to do :

LogIn in a webpage using this URL :

http://movies.hsx.com/servlet/Login?...ortfolio&login...

and download the source page in a txt file that i could save on my
computer.

I have tried with HttpWebRequest, WebRequest,
AllowAutoRedirect=true...etc....

nothing works...all that it downloads is a source page where it says
Please LogIn...but where i use this URL in a browser...it shows me the
correct page and i can save manually the source code of the page.

Can someone attemp to crack this problem ?

I don't need anything fancy...only something that i can put a URL and
a save file path...thats it.

Thank you very much...!

I've put so many hours on this....

Martin

Mar 20 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.