/** * Is this transfer method blocked by a server firewall? * * @param array $params Any additional parameters you might need to pass * * @return boolean True if the firewall blocks connections to a known host */ public static function isFirewalled(array $params = array()) { try { $connector = new Sftp(array('host' => 'test.rebex.net', 'port' => 22, 'username' => 'demo', 'password' => 'password', 'directory' => '')); $data = $connector->read('readme.txt'); if (empty($data)) { return true; } } catch (\Exception $e) { return true; } return false; }