cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Curl result

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Fri, 17 Nov 2006 14:56:37 -0800

On Fri, Nov 17, 2006 at 05:33:49PM -0500, Michel Lemieux wrote:
> I am trying to build a module that parses the result given by a FTP server upon
> a curl request.
>
> Is there a resource anywhere that will break down the information from the
> server result?
>
> For instance, I figured out that the first character determines what kind type
> of item it is (directory, file, alias, etc.) the next 9 are for the rights. Its
> after that that I get lost.
>
> Can anybody help?

There's no single standard for this. Browsers know about the most common
formats and guess at which format the server supports then try to use an
appropriate parser. You're best off reusing some existing browser parsing
source if you're intending your program to work with multiple ftp servers.
e.g. The function loadFTPDir() in the w3m browser (at
http://sf.net/projects/w3m ) does FTP directory parsing.

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
Received on 2006-11-18