Connecting Tech Pros Worldwide Help | Site Map

ftp_get() Help

ralphNOSPAM@primemail.com
Guest
 
Posts: n/a
#1: Aug 23 '05
I'm trying to download a text file named KLAX.TXT at

tgftp.nws.noaa.gov

using

if (ftp_get($conn_id, "Metar Reports/$local_file", $server_file,
FTP_BINARY))
{
print "Success";
}

But I keep gettning this err msg:

Warning: ftp_get(): /data/observations/metar/stations/: not a plain
file.

I don't understand the msg as the file *is* a text file.

You can go here with your browser and see it's a text file.

ftp://tgftp.nws.noaa.gov/data/observ...etar/stations/


Joachim Weiß
Guest
 
Posts: n/a
#2: Aug 23 '05

re: ftp_get() Help


ralphNOSPAM@primemail.com schrieb:[color=blue]
> I'm trying to download a text file named KLAX.TXT at
>
> tgftp.nws.noaa.gov
>
> using
>
> if (ftp_get($conn_id, "Metar Reports/$local_file", $server_file,
> FTP_BINARY))
> {
> print "Success";
> }
>
> But I keep gettning this err msg:
>
> Warning: ftp_get(): /data/observations/metar/stations/: not a plain
> file.
>[/color]
it seem that you do'nt adress KLAX.txt but the directory listing .....
perhaps your var $server_fiel does not contain what you expect ....
[color=blue]
> I don't understand the msg as the file *is* a text file.[/color]
the directory isn't
[color=blue]
> ftp://tgftp.nws.noaa.gov/data/observ...etar/stations/[/color]

ftp://tgftp.nws.noaa.gov/data/observ...tions/KLAX.TXT
is a text file

HIH

Jo
Closed Thread