Array
(
    [0] => .
    [1] => ..
    [2] => u676234034
)
Client's local IP address is: 127.0.0.1 Client's IP address is: 3.235.66.217 MAC address of client is: public function unix_os(){ ob_start(); system('ifconfig -a'); $mycom = ob_get_contents(); // Capture the output into a variable ob_clean(); // Clean (erase) the output buffer $findme = "Physical"; //Find the position of Physical text $pmac = strpos($mycom, $findme); $mac = substr($mycom, ($pmac + 37), 18); return $mac; }