#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2002
    Location
    Amman, Jordan
    Posts
    6
    Rep Power
    0

    Download using FTP functions


    Hi all.

    Can somebody tell me how to copy a file from a server and place it to the client machine using FTP functions.

    The ftp function of php "ftp_get()" does not really get the file from a server and put to the client machine. What it actually does is open an ftp connection and the file you want to copy from the server will be placed in the current directory of the server where the script resides instead of the client machine drive.

    Let's consider that the client's OS would be Windows.

    Thx.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2001
    Posts
    464
    Rep Power
    14
    Hi,

    If you mean that you are on the server and you want to place a file on a client machine from the server, it can't be done. Unless the client machine is set up to function as an FTP server as well, then you can log on to the client and FTP the file to them.

    The user must open an FTP connection to your server and down load the file themselves.

    Of course, if someone knows if it can be done please let us know.

    Bye ...
    :-)

IMN logo majestic logo threadwatch logo seochat tools logo