Text files from web servers--Say it ain't so!

Sarah Reichelt sarah.reichelt at gmail.com
Thu Jan 5 19:42:21 EST 2006


On 1/6/06, Devin Asay <devin_asay at byu.edu> wrote:
> I've spent the better part of two days coding a utility designed to
> pull log files (plain ascii text) off a web server, then parse the
> contents for a report. After initially testing the concept with local
> files, today I realized that when you use the 'get URL "http://
> myserver.com/myfile.log"' form it STRIPS ALL RETURNS out of the file!
> I must have known this before, but it slipped my deteriorating mind.
> Before I recode my utility, can someone tell me, is it possible to
> pull a text file off a web server using the http protocol and retain
> the return characters?

What new line character does the log file use? it could be
numToChar(10), numToChar(13) or CRLF (both together). Try getting the
data and then checking for these three characters and replacing with
CR.

Cheers,
Sarah



More information about the use-livecode mailing list