public function ping($host = '', $port = 80)
    {
        $start  = microtime(true);
        $file   = @fsockopen($host, $port, $errno, $errstr, 5);
        $stop   = microtime(true);
        $status = 0;

        if (!$file) {
            $status = -1;
        } else {
            fclose($file);
            $status = round((($stop - $start) * 1000), 2);
        }
        return $status;
    }