Get MAC address using PHP
Get MAC address using PHP
Get MAC address using PHP
Get the MAC (Media Access Control) address of a system using php. We are having 2 separate code. One for Windows and other for Linux.
On Windows Machine
ob_start(); system('ipconfig /all'); $mycom=ob_get_contents(); // Capture the output into a variable ob_clean(); $findme = "Physical"; $pos = strpos($mycom, $findme); $macp=substr($mycom,($pos+36),17); echo "The mac id of this system is :".$macp;
On Linux Machine
It is very easy in Linux, Just run the ip addr command and grep for ‘link/ether’. Then use awk to pring the 2nd variable.
<?php echo "The mac id of this system is :"; system("/sbin/ip addr|/bin/grep link/ether | /bin/awk '{print $2}'"); ?>Get MAC address using PHP,
Incoming search terms:
- jquery get mac address (16)
- jquery mac address (9)
- php get mac address (5)
- get mac address php (3)
- PHP MAC ADDRESS (3)
- get mac address using php (2)
- php system(ipconfig /all) (2)
- get local mac address jquery (2)
- mac address php (2)
- mac address php script (2)
- obtener mac address jquery (2)
- how to get mac address with jquery (1)
- how to get mac address with php (1)
- howto get local Mac address perl unix (1)
- javascript get client mac address jquery (1)
- javascript get mac (1)
- jquery client mac address (1)
- php $_ get [box_ mac] (1)
- jquery mac ad read (1)
- php extraer mac-address (1)
- jquery to find system mac address client (1)
- JS how to get mac address Chrome (1)
- how to get mac address using jquery php (1)
- how to get mac address in online website (1)
- how to get mac address in jquery (1)
- find mac address by php (1)
- find mac address php (1)
- get client mac address jquery (1)
- system(ipconfig /all); php (1)
- get local mac php (1)
- get mac address ajax (1)
- get mac address html jquery php (1)
- get mac address of client php (1)
- get mac address with jquery (1)
- get the mac address html (1)
- get the mac php (1)
- how detect physical address with browser java scripts (1)
- how to capture mac address using php (1)
- how to get computer physical address by jquery (1)
- how to get local mac address from php (1)
thanks for sharing it’s working!