kalpana Posted January 30, 2008 Share Posted January 30, 2008 hi, i have a code to connect to ftp using curl. It works in my local system but when i upload it to the server, nothing is displayed. Can some one help me out to sort this problem. Here is my code: <? set_time_limit(100000); $curl = curl_init() or die(curl_error($curl)); $ftp_server = "ftp://username:[email protected]"; curl_setopt($curl, CURLOPT_URL, $ftp_server); curl_setopt($curl, CURLOPT_TIMEOUT, 40000); curl_setopt($curl, CURLOPT_FTPLISTONLY, 1); ob_start(); curl_exec ($curl) or die(curl_error($curl)); ob_end_clean(); curl_close ($curl); ?> Is there any thing wrong in this code? Link to comment https://forums.phpfreaks.com/topic/88548-connecting-to-ftp-through-curl/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.