Im confused by an estate agency vebra import script that worked fine before it was moved to a different server however now this seems to not work at all.

Does anyone have any idea why i would get the following warnings...

> 
> Warning: ftp\_get() [function.ftp-get]: Opening data channel for file
>  transfer. in
>  /home/username/public\_html/includes/cron/import/vebra-import.php on
>  line 37
> 
> 
> Warning: ftp\_get() [function.ftp-get]: Transfer OK in
>  /home/username/public\_html/includes/cron/import/vebra-import.php on
>  line 37
> 
> 
> 

here is the ftp connection code:

```
  $ftp = ftp_connect($ftp_host, 21) or die("FTP Connection Error");

  ftp_login($ftp, $ftp_user, $ftp_pass) or die("Can't Connect to FTP");

  $ftpdir = ftp_nlist($ftp, "/");

  if(!empty($ftpdir) && count($ftpdir) > 0) {

  foreach($ftpdir as $ftpfile) {

      if(preg_match("/\.txt$/", $ftpfile)) {
          $getfile = ftp_get($ftp, $csv_dir.$ftpfile, $ftpfile, FTP_BINARY);
          if($getfile){
              $downloaded++;
          }
          $total++;

      }

  }

  }
  ftp_close($ftp);

```

Furthermore, it seems to be intermittent, and sometimes this executes successfully other times it fails with the above errors.