private function ftp()
    {
        $servers = static::SERVERS;  // Server list
        // Try each server till success
        $ftp;
        for ($i = 0; $i < count($servers); $i++) {
            $ftpServer = $servers[$i]['domain'];
            $ftp       = ftp_connect($ftpServer);

            // Return resource on connected
            if ($ftp) {
                if (ftp_login($ftp, 'anonymous', null)) {
                    if (ftp_chdir($ftp, $servers[$i]['path'])) {
                        if (ftp_pasv($ftp, true)) {
                            return $ftp;
                        }
                    }
                }
            }
        }

        // Unable to connect to a server
        throw new \Exception('Unable to connect to server to download data');
    }
private function ftp()
    {
        $servers = static::SERVERS;  // Server list
        // Try each server till success
        $ftp;
        for ($i = 0; $i < count($servers); $i++) {
            $ftpServer = $servers[$i]['domain'];
            $ftp       = ftp_connect($ftpServer);

            // Return resource on connected
            if ($ftp) {
                if (ftp_login($ftp, 'anonymous', null)) {
                    if (ftp_chdir($ftp, $servers[$i]['path'])) {
                        if (ftp_pasv($ftp, true)) {
                            return $ftp;
                        }
                    }
                }
            }
        }

        // Unable to connect to a server
        throw new \Exception('Unable to connect to server to download data');
    }
private function ftp ( ) { $ servers = static :: SERVERS ; // Server list // Try each server till success $ ftp ; for ( $ i = 0 ; $ i < count ( $ servers ) ; $ i ++ ) { $ ftpServer = $ servers [ $ i ] [ 'domain' ] ; $ ftp = ftp_connect ( $ ftpServer ) ; // Return resource on connected if ( $ ftp ) { if ( ftp_login ( $ ftp , 'anonymous' , null ) ) { if ( ftp_chdir ( $ ftp , $ servers [ $ i ] [ 'path' ] ) ) { if ( ftp_pasv ( $ ftp , true ) ) { return $ ftp ; } } } } } // Unable to connect to a server throw new \ Exception ( 'Unable to connect to server to download data' ) ; }
Connects to the first available IERS server mirror and returns an FTP
connection resource

@return resource FTP resource
@throws \Exception
Connects to the first available IERS server mirror and returns an FTP connection resource