can i get mac id of laptop with php
function getMacLinux() {
exec('netstat -ie', $result);
if(is_array($result)) {
$iface = array();
foreach($result as $key => $line) {
if($key > 0) {
$tmp = str_replace(" ", "", substr($line, 0, 10));
if($tmp <> "") {
$macpos = strpos($line, "HWaddr");
if($macpos !== false) {
$iface[] = array('iface' => $tmp, 'mac' => strtolower(substr($line, $macpos+7, 17)));
}
}
}
}
return $iface[0]['mac'];
} else {
return "notfound";
}
}
Also in PHP:
- adding data dynamically to empty array in php
- cache DB table laravel
- date chenge format php
- composer laravel 6 install
- check if a string contains php
- cart icon in woocommerce
- check an string incudes a string php
- find string lenght in php
- determine type in function php
- What parameter should you enable if you wish for your browser to show all errors?
- db seeder laravel 5
- csv file import encoding error
- array key exists php dont return
- base64 image encode php
- check if index of array exists php
- exist in string php
- aes php
- console log in web php
- date compare php
- create model with controller laravel
- can i back up mysql database from php code?
- check which database connect laravel
- PHP Fatal error: Uncaught Error: Call to undefined function curl_init
- codeigniter mdate()+1 day?