dubc07 Posted March 25, 2009 Share Posted March 25, 2009 Is there anyway to use php's ftp to download to computer rather than a local host or remote? I know we can use copy feature but i 'm wanting to download to computer via header Quote Link to comment Share on other sites More sharing options...
dubc07 Posted March 25, 2009 Author Share Posted March 25, 2009 This is going to be a tough one. Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted March 25, 2009 Share Posted March 25, 2009 FTP is a protocol. It requires an ftp client and a ftp server. The php ftp functions "implement client access to file servers speaking the File Transfer Protocol (FTP)" and therefor require a ftp server at the other end in order to send or retrieve files. I'm not sure if that answers your question as it was fairly vague. Quote Link to comment Share on other sites More sharing options...
dubc07 Posted March 25, 2009 Author Share Posted March 25, 2009 To follow up on the answer provided by PFMaBiSmAd I have a php script that access's the ftp via ftp servername, username and password The scripts pulls the data by directory using the php function ftp_nlist. This script that i have is successful at connecting to the ftp server and displaying directory and files listed on the server. However there is no function for grabbing and downloading to a pc via browser header example: header('Content-Type: application/octet-stream'); There are functions for copy and write to local and remotes on the server but i was just wondering if any of you brilliant developers out there had a means of downloading via headers. Quote Link to comment Share on other sites More sharing options...
trq Posted March 25, 2009 Share Posted March 25, 2009 Take a look at the force download script in the FAQ/Snippet Repo maybe? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.