public function hostname()
    {
        if ($this->host_os === 'WINDOWS') {
            $wmi = new \COM("winmgmts:\\\\.\\root\\cimv2");
            $computer = $wmi->ExecQuery("SELECT * FROM Win32_ComputerSystem");

            foreach ($computer as $c) {
                $hostname = $c->Name;
            }
        } else {
            $hostname = shell_exec('hostname');
        }
        return trim($hostname);
    }