public function isPortOpenRepeater($seconds = 15)
    {
        $start = time();
        $instance = $this->getPingInstance();

        do {
            $current = time() - $start;
            $latency = $instance->ping('fsockopen');

            if ($latency !== false) {
                return true;
            }
        } while ($current <= $seconds);

        return false;
    }
public function isPortOpenRepeater($seconds = 15)
    {
        $start = time();
        $instance = $this->getPingInstance();

        do {
            $current = time() - $start;
            $latency = $instance->ping('fsockopen');

            if ($latency !== false) {
                return true;
            }
        } while ($current <= $seconds);

        return false;
    }
public function isPortOpenRepeater ( $ seconds = 15 ) { $ start = time ( ) ; $ instance = $ this -> getPingInstance ( ) ; do { $ current = time ( ) - $ start ; $ latency = $ instance -> ping ( 'fsockopen' ) ; if ( $ latency !== false ) { return true ; } } while ( $ current <= $ seconds ) ; return false ; }
Check if the host port is opened within a timeframe.

@param int $seconds
The amount of seconds it should continuously check.

@return bool
Return true if the host port is open; otherwise false.
Check if the host port is opened within a timeframe .