473,811 Members | 2,893 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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,
AllowAutoRedire ct=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
1 3136
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,
AllowAutoRedire ct=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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
5836
by: peetm | last post by:
I'd like to write to a log whenever a visitor to my site downloads a file. So, I'd like the link they click to be to a php 'page' that returns the file. Don't know how to do that! Side Question ... Presumably, the dialog that you see when you download a binary (asking for a 'Save As...' file name) is put up by your browser when it 'sees' non-text data coming back as a response? So, how would you download a text file - and cause...
3
12413
by: James Kirk | last post by:
The script below allows me to link to a file and as the user clicks to download, the 'File Download' windows appears as normal, and the user can download... The original page is then redirected to a new page.. This works, but it also opens a blank page.. How can this be chaged to stop the blank page from opening... ? <script type="text/javascript">
2
2016
by: Tom Youngquist | last post by:
I am trying to download a text file that my .NET page has just created based on entered parameters on the web page. Everything seems to work and the file is created. I am using the following code to start the download process: Response.Clear() Response.ContentType = "text/plain" Response.AppendHeader("Content-Disposition", "attachment; filename=" & fileName) Response.AppendHeader("Content-Description", "This is your Cost Journal...
0
1836
by: Buddy Ackerman | last post by:
I am trying to implment a file download via a link such that when clicked, instead of starting the default application for that type of file the user will be presented with a download dialog window. Well, thanks to Steve Orr, I have that working. However, I still have a few issues. First, the download dialog does not have the name of the file being downloaded in the "File name" field, instead it has the name of the aspx page that have...
4
2703
by: Hitesh | last post by:
Hi, I am having a requirement where in user can click on a link and the download popup appears and then user should be redirected to a congratulations page. We didn't bother whether the download is successful or not but as soon as user clicks on the download link the popup appears, and then the user should be directed to the congratulations page. I have written the standard code to download the file but after that i am
6
4906
by: scottyman | last post by:
I can't make this script work properly. I've gone as far as I can with it and the rest is out of my ability. I can do some html editing but I'm lost in the Java world. The script at the bottom of the html page controls the form fields that are required. It doesn't function like it's supposed to and I can leave all the fields blank and it still submits the form. Also I can't get it to transfer the file in the upload section. The file name...
2
1246
by: Prabhat | last post by:
Hello friends, Currently I have one asp page which opens after the proper ID entered by user and it generate <A> tag with application software download link. When the user click on the link (which is pointed to the actual physical file ..EXE of Size around 10 - 20 MB) it downloads file. But how do i change the logic so that the activity will get LOG in some text file. Like which user has downloaded which file. (it should log into text...
2
2566
by: Jan Paul van de Berg | last post by:
I have a piece of software that people can download and a third party promoting that software. In order for them to be able to count the number of downloads, I have to put a tracking code on my site. The tracking code must be sent to the client when the user clicks the download button. At the same time, the download must start. The download button links to this page: - Possibility 1, server side redirect to executable...
4
8704
by: ridgedale | last post by:
I wonder if anyone can help me out with this. I am sending the user to a download page where when they click on the download button the file is downloaded and then I want the user redirected after the file download to a confirmation page. My download processing page is as follows: <?php $mytalk = $_GET; if($_GET == "1"): $mytalk = 'Talk 1';
9
21316
by: Matt Nunnally | last post by:
I have a form which allows the user to download a simple text file. They click on the download button and it brings up the "Save As" dialog. Once they save the file, I want them to be redirected to another page. Here is the code I'm using: Response.ContentType = "text/plain" Response.AppendHeader("Content-Disposition", "attachment; filename=Security.PCC") Response.TransmitFile(PassGen.Path &...
0
10644
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10379
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10394
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10127
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7665
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6882
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5690
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4336
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3015
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.