#1
  1. // no comment
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Dec 2001
    Posts
    1,645
    Rep Power
    39

    connecting to a secure ftp server


    anybody here knows how to connect to a secure ftp server using php.

    i've been trying to use php's ftp functions, but i cant seem to get it to work. my script always times out (Fatal error: Maximum execution time of 30 seconds exceeded in ...) at the connection line - ftp_connect() - even if i change the max time.

    help anyone?
  2. #2
  3. No Profile Picture
    Apprentice Deity
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 1999
    Location
    Niagara Falls (On the wrong side of the gorge)
    Posts
    3,237
    Rep Power
    19
    The built in ftp functions do not support that. You'll have to use curl
  4. #3
  5. // no comment
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Dec 2001
    Posts
    1,645
    Rep Power
    39
    thank for the tip. i've been reading on the curl functions at http://curl.haxx.se i only see ftp functions. will that do it or do i need to use some other function?
    Last edited by roninblade; September 4th, 2002 at 06:45 AM.
  6. #4
  7. No Profile Picture
    Apprentice Deity
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 1999
    Location
    Niagara Falls (On the wrong side of the gorge)
    Posts
    3,237
    Rep Power
    19
    Well, it doesn't directly support SFTP. You would have to open a SSH tunnel (using ssh -L localport:remotehost:remoteport) then opening a connection to the local port with FTP. Of course the remote host has to be configured for this as well.
  8. #5
  9. // no comment
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Dec 2001
    Posts
    1,645
    Rep Power
    39
    can anybody point me to any good articles/docs that discusses cURL with php in detail. i'd like to play around with the cURL functions more but i'm a bit pressed for time on this project.

IMN logo majestic logo threadwatch logo seochat tools logo