Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~1K People Reached
Favorite Forums
Favorite Tags
php x 4
Member Avatar for astroboy44

Hi guys,I am trying to force download files from ftp server to my local machine using the following code. [CODE] <?php header("Content-type: application/octet-stream"); header("Content-Disposition: attachment; filename=\"" . basename($filename) . "\""); header("Content-Transfer-Encoding: binary"); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'ftp://username:password@localhost/'.$path.'/'.$filename); curl_setopt($ch, CURLOPT_HEADER, 0); curl_exec ($ch); curl_close($ch); ?>[/CODE] The above code works perfectly …

Member Avatar for astroboy44
0
1K