curl-library
Re: FTP get file in binary mode
Date: Mon, 20 Dec 2004 22:17:57 -0800
On Mon, Dec 20, 2004 at 09:02:35PM -0800, Ashish Nigam wrote:
> Hi,
> I have to download a file from FTP server machine in binary mode. Simple isn't
> it. But I am not able to figure out the right way till now.
> As far as I know, there can be three options -
>
> 1) Set CURLOPT_URL to complete path of the file like ftp://<server_name>/
> path_to_file
> The problem with this option is that it logs to home directory of the user
> rather than root or / .
> And in this case, absolute path will fail because curl will try to CWD
> path_to_file which is true with respect to root rather than user home
> directory.
Curl treats an empty first path element as an indication of a root-relative
path. i.e. Use ftp://<server_name>//absolute_path_to_file instead of
ftp://<server_name>/path_to_file
>>> Dan
-- http://www.MoveAnnouncer.com The web change of address service Let webmasters know that your web site has movedReceived on 2004-12-21