"Read" a URL?

Dar Scott dsc at swcp.com
Mon Mar 1 02:24:09 EST 2004


On Sunday, February 29, 2004, at 08:34 PM, Scott Rossi wrote:

> I'm wondering if it's possible to read the last line of a text file 
> stored
> on the Web, instead of downloading the whole 2MB file into a variable. 
>  So
> far:
>
>   open file net_address_of_file for read
>
> ...returns "can't open that file".

Add the header line "Range: -200" to the HTTP header to get the last 
200 characters.  Something like that.

There is probably a better way with FTP.  I understand that some HTTP 
servers will respond with the entire file anyway.

Dar Scott



More information about the use-livecode mailing list