Downloading the first part of a file / the header 
Author Message
 Downloading the first part of a file / the header

Hello everybody!

MY PROBLEM DOWNLOAD THE FIRST PART OF THE FILE
OR THE HEADER ONLY

I could easily read the entire file using

     dim b() as byte
     b() = inet1.openurl(UrlStr,1)                'reads the file in binary

     For t = 0 To UBound(b) - 1
             fileStr = FileStr + Chr(b(t))         'converts the file in chr
string
     Next

but I don't want to download the entire file. So I thaught about
using

     inet1.getchunk

or using

    inet1.getheader

I don't know how to use them. Do I have to use inet1.execute? How?
Please, help me.

THANKS A LOT FOR ALL



Mon, 27 Oct 2003 01:35:29 GMT  
 Downloading the first part of a file / the header
Yes, you need to use .Execute.  See example at
http://msdn.microsoft.com/library/devprods/vs6/vbasic/Inet98/vbmthget....
htm

In your case, don't use the "Do While" - just grab one chunk and then
Inet1.Cancel

Sean Franklin


Quote:
> Hello everybody!

> MY PROBLEM DOWNLOAD THE FIRST PART OF THE FILE
> OR THE HEADER ONLY

> I could easily read the entire file using

>      dim b() as byte
>      b() = inet1.openurl(UrlStr,1)                'reads the file in
binary

>      For t = 0 To UBound(b) - 1
>              fileStr = FileStr + Chr(b(t))         'converts the file in
chr
> string
>      Next

> but I don't want to download the entire file. So I thaught about
> using

>      inet1.getchunk

> or using

>     inet1.getheader

> I don't know how to use them. Do I have to use inet1.execute? How?
> Please, help me.

> THANKS A LOT FOR ALL



Thu, 30 Oct 2003 05:07:37 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Downloading the first part of a file / the header

2. Downloading the first part of a file / the header

3. first part of file name

4. Q: SQL to import from text file - ignores first (non-header) record

5. INET: DOWNLOADING PART of FILES

6. INET: DOWNLOADING PART of FILES

7. Removing WWW Server HEADERS from download GIF file

8. Pulling Header information BEFORE downloading file??

9. multi-part http headers

10. Custom Header on first page only

11. Copying text from header to top of first page of New Section

12. hiding empty first page header

 

 
Powered by phpBB® Forum Software