Reading HTTP Headers in my VB.NET application
Reading HTTP Headers in my VB.NET application
Reading HTTP Headers in my VB.NET application
Reading HTTP Headers in my VB.NET application
Reading HTTP Headers in my VB.NET application
Reading HTTP Headers in my VB.NET application Reading HTTP Headers in my VB.NET application Reading HTTP Headers in my VB.NET application Reading HTTP Headers in my VB.NET application Reading HTTP Headers in my VB.NET application Reading HTTP Headers in my VB.NET application Reading HTTP Headers in my VB.NET application Reading HTTP Headers in my VB.NET application
Reading HTTP Headers in my VB.NET application Reading HTTP Headers in my VB.NET application
Reading HTTP Headers in my VB.NET application
Go Back  Xtreme Visual Basic Talk > > > Reading HTTP Headers in my VB.NET application


Reply
 
Thread Tools Display Modes
  #1  
Old 11-10-2008, 04:41 AM
breendamachine breendamachine is offline
Newcomer
 
Join Date: Nov 2007
Posts: 17
Default Reading HTTP Headers in my VB.NET application


Hello to all,

I am a somewhat intermediate Visual Basic programmer, but that is with VB6. I am starting to use .Net and am trying to learn as I go. I have the 2008 edition.

I have searched far and wide for answers on the project I am creating. I think I am somewhat close to what I want but am not exactly sure how close and I am still not getting the results I want. I want to make a program that will download streaming video files from sites such as Youtube, Dailymotion, etc. I know there are plenty of programs to do this including FireFox addins, but I want to try to create one and customize it how I want it. It would be my first big .Net application. So its not like I will be releasing this app for money or anything, I just like to know I made one and that it works.

So the closest thing I could find and use comes from this MSDN page : http://msdn.microsoft.com/en-us/libr...ntenttype.aspx

I basically copied and pasted this code in a Button Click event and put the results to show up in a text box. This seems to pull some information that the website is sending back to my computer but not what I need. This seems to read the source of the page and paste it in the text box I have. This is OK if the path to the streaming video file download is in the source of the page. However, for most of these sites, this will never work. Some sites require you to press the play button which then sends the request for the file download, and that URL to the video file is not embedded in the source code of the webpage.

So am I on the right track? How do I get the program to look through all requests that are sent to look for the flv context type, and then use that URL associated with it. If I use this website address : http://www.youtube.com/watch?v=36aTRiTeauA and I use Firebug FireFox addin to capture HTTP Headers and such, I can see the following come through :

Last-Modified: Tue, 14 Oct 2008 19:33:29 GMT
Content-Type: video/x-flv
content-disposition: attachment; filename=video.flv
Content-Length: 4582369
Expires: Mon, 10 Nov 2008 11:27:25 GMT
Cache-Control: public,max-age=3600
Connection: close
Date: Mon, 10 Nov 2008 10:27:25 GMT
Server: gvs 1.0

and this is the GET response that I receive with the actual URL of the video download.

So what I am thinking, is I need to find a way to read the responses I get, disregard everyone of them that is not the video/x-flv context type (and other video formats once I get this to work, flv is most poplular and best to use for a starting point) and add the URL that is associated with each video/x-flv context type to a list to allow the user to download the file. Also, like I mentioned above, some sites make you press play before you see the video and I would need to capture that response once the play button is pressed, which may not be at the beginning of the page load. Can anyone help, and point in the right direction. Please remember I am new to .NET and alot of the stuff I read so far, makes little to no sense, or is written in C which I cannot read Thanks in advance.
Reply With Quote
  #2  
Old 11-19-2008, 10:11 AM
breendamachine breendamachine is offline
Newcomer
 
Join Date: Nov 2007
Posts: 17
Default

So now after a little more research, I have followed this Microsoft MSDN page : http://msdn.microsoft.com/en-us/libr...t.headers.aspx

The first half of this code returns one HTTP header, with a Content-Type of Text. This is not the one I am looking for when visiting a site with embedded flash players on them, because I want the one that is for flv files. (or other media I may be trying to capture). So now that I am able to bring the one HTTP header up, how do I keep bringing all of them in so that I can search for one that is for the flv content type? I have tried to manipulate the code but have been unable to search through other HTTP headers.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Reading HTTP Headers in my VB.NET application
Reading HTTP Headers in my VB.NET application
Reading HTTP Headers in my VB.NET application Reading HTTP Headers in my VB.NET application
Reading HTTP Headers in my VB.NET application
Reading HTTP Headers in my VB.NET application
Reading HTTP Headers in my VB.NET application Reading HTTP Headers in my VB.NET application Reading HTTP Headers in my VB.NET application Reading HTTP Headers in my VB.NET application Reading HTTP Headers in my VB.NET application Reading HTTP Headers in my VB.NET application Reading HTTP Headers in my VB.NET application
Reading HTTP Headers in my VB.NET application
Reading HTTP Headers in my VB.NET application
 
Reading HTTP Headers in my VB.NET application
Reading HTTP Headers in my VB.NET application
 
-->