ftp_get() Help

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ralphNOSPAM@primemail.com

    ftp_get() Help

    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ß

    #2
    Re: ftp_get() Help

    ralphNOSPAM@pri memail.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

    Comment

    Working...