PC Review


Reply
Thread Tools Rate Thread

Any way to extract certain bytes from the remote file?

 
 
Vjay77
Guest
Posts: n/a
 
      13th Apr 2004
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 With Quote
 
 
 
 
Jim Hubbard
Guest
Posts: n/a
 
      13th Apr 2004
On 12 Apr 2004 18:31:23 -0500, Vjay77 wrote:

> 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


Is this file actually on a web server?
 
Reply With Quote
 
Jim Hubbard
Guest
Posts: n/a
 
      13th Apr 2004
On Mon, 12 Apr 2004 22:07:36 -0400, Jim Hubbard wrote:

> On 12 Apr 2004 18:31:23 -0500, Vjay77 wrote:
>
>> 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

>
> Is this file actually on a web server?


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/s...10926&lngWId=1
..
 
Reply With Quote
 
Vjay77
Guest
Posts: n/a
 
      13th Apr 2004
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?

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
When using System.IO.FileStream, I write 8 bytes, then seek to the start of the file, does the 8 bytes get flushed on seek and the buffer become a readbuffer at that point instead of being a write buffer? DR Microsoft Dot NET Compact Framework 2 30th Jul 2008 07:31 PM
When using System.IO.FileStream, I write 8 bytes, then seek to the start of the file, does the 8 bytes get flushed on seek and the buffer become a readbuffer at that point instead of being a write buffer? DR Microsoft ASP .NET 2 29th Jul 2008 10:50 AM
When using System.IO.FileStream, I write 8 bytes, then seek to the start of the file, does the 8 bytes get flushed on seek and the buffer become a readbuffer at that point instead of being a write buffer? DR Microsoft ADO .NET 0 29th Jul 2008 02:37 AM
When using System.IO.FileStream, I write 8 bytes, then seek to the start of the file, does the 8 bytes get flushed on seek and the buffer become a readbuffer at that point instead of being a write buffer? DR Microsoft Dot NET Framework 0 29th Jul 2008 02:37 AM
Read bytes from file and create a file with the readed bytes paraidy Microsoft VB .NET 8 1st Feb 2007 07:55 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:28 PM.