FTP connection problem (Connection refused (111))

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • devtalex
    New Member
    • Jul 2007
    • 1

    FTP connection problem (Connection refused (111))

    hello all!... i'm novice here...

    I've such kind of issue.
    The purpose of my code is to copy a number of files by FTP (using different ports every time).
    There are different numbers of files every time. The prblem appears when there is lot of files to copy.
    On some accounts the minmum number of files fluently copied is 15, on other 50, etc... But at the end it gives such error message:


    Error : Cannot open data connection to IP_ADDRESS:PORT _NUMBER
    Error : Connection refused (111)
    Error : Cannot connect to remote host


    here is a PHP code:
    [PHP]$data = preg_split("/,/", $ipPort, -1);
    $port = $data[4]*256 + $data[5];
    $dataConnection = @fsockopen($ipa ddr, $port, $errno, $errstr);
    [/PHP]

    Could you say me why it happens ?
Working...