title: File upload through FTP in php
body: <p>I want to upload a file to multiple FTP.But it is showing error :</p>
  
  <p><code>ftp_put() [function.ftp-put]: php_connect_nonb() failed: Operation now in progress (115)</code>.</p>
  
  <p>Have a look to my code</p>
  
  <pre><code>foreach ($channel_details as $channel_list)
  {
  
      if(isset($connection))
      unset($connection);
      if(isset($login))
      unset($login);
      if(isset($upload))
      unset($upload);
  
      $server = $channel_list['channel'];
      $ftp_user_name = $channel_list['username'];
      $ftp_user_pass = $channel_list['password'];
  
      $source='file_push.html';
  
  
     $dest='/public_html/'.$path.$file;
  
  
      $connection = ftp_connect($server) or die("Couldn't connect to ftp server");
  
  
      $login = ftp_login($connection, $ftp_user_name, $ftp_user_pass);
  
      // turn passive mode on
      ftp_pasv($connection, true);
  
      if (!$connection || !$login) { die('Connection attempt failed!'); }
  
      $upload = ftp_put($connection, $dest, $source, FTP_ASCII);
      if (!$upload) { echo 'FTP upload failed!'; }
  
      ftp_close($connection); 
  
  }
  </code></pre>