Home  |  Index  |  Dotnet4all Snippets  |  Submit resources
About  |  Mail us  
Dotnet4all Logo

  Any way to extract certain bytes from the remote file? (Thursday, September 02, 2004)




Found the following interesting discussion in the Newsgroups:

Any way to extract certain bytes from the remote file?
by:joe@doprocess-dot-com.no-spam.invalid (Vjay77)

I posted this question, but I pressed 'post' and it disappeared. So once again:

Problem:
I need to go to lets say www.site.com/page.html

Imagine that this html code is 6 mb long.

I need to extract information between bytes 5000 and 5020.

So, obviously problem is, that I do not want to download the whole 6 mb file to extract only 20 bytes.

I will need to do this maybe thousands times a day and I can't afford to create such traffic.

Is there a way to extract from remote file using exact position?

Something which would simulate steps:

- go to www.site.com/page.html
- open file for reading
- jump to byte x
- read y number of bytes
- retrieve result
- close file

Is there any way of doing this?

Please help me.

Vjay


 Reply:
by:Jim Hubbard

 
Is this file actually on a web server?


 Reply:
by:Jim Hubbard

 
If so, look into HTTP resuming - IF the web server supports it. There is
vb6 source code that shows how to do this at
http://www.planetsourcecode.com/vb/scripts/ShowCode.asp?txtCodeId=10926&lngWId=1
..


 Reply:
by:joe@doprocess-dot-com.no-spam.invalid (Vjay77)

 Yes I ment remote file at webserver.I need to know how to do this in .net. You pointed me to vb 6.0, and to whole application.
Please does anyone know how to do this.
I mean is there a way to do this in .net?









 
Previous Posts
    - Date format problem with vb.net
    - Dynamic Expression Evaluation
    - Finding the Printable area
    - How to add a dimension to an array in VB.NET
    - How to access a Specific Mailbox on Exchange
    - DataGrids and obtaining information from them
    - Turn of time Automatic update in DateTimePicker Co...
    - datetime.addminutes
    - How to draw a rectangle on a form
    - Protect from Reverse engineering

Archives
    - 08/01/2004 - 08/08/2004
    - 08/08/2004 - 08/15/2004
    - 08/15/2004 - 08/22/2004
    - 08/22/2004 - 08/29/2004
    - 08/29/2004 - 09/05/2004
    - 09/05/2004 - 09/12/2004
    - 09/12/2004 - 09/19/2004
    - 09/19/2004 - 09/26/2004
    - 09/26/2004 - 10/03/2004
    - 10/03/2004 - 10/10/2004
    - 01/02/2005 - 01/09/2005
    - 01/09/2005 - 01/16/2005
    - 01/30/2005 - 02/06/2005
    - 01/01/2006 - 01/08/2006


Disclaimer & Terms of Use  | DotNet4All.Com concept & © 2004 - 2007 by  Zelders²  - Holland