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 Link to comment https://forums.phpfreaks.com/topic/151121-php-ftp-download-using-header/ 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. Link to comment https://forums.phpfreaks.com/topic/151121-php-ftp-download-using-header/#findComment-793877 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. Link to comment https://forums.phpfreaks.com/topic/151121-php-ftp-download-using-header/#findComment-793985 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. Link to comment https://forums.phpfreaks.com/topic/151121-php-ftp-download-using-header/#findComment-793999 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? Link to comment https://forums.phpfreaks.com/topic/151121-php-ftp-download-using-header/#findComment-794007 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.