![]() Well, you're out of luck unless you can have the client volunteer that information and transmit via other means. What is MAC Address MAC is the abbreviation of Media Access Control and it is a 48-bit physical address associated with every networking device. ![]() Please note that, mac address and ip address are totally different. #look for the output line describing our IP address You can get client MAC address in PHP using the exec () function. #run the external command, break output into lines So, if you are building some kind of LAN based system and your clients are on the same ethernet segment, then you could get the MAC address by parsing the output of arp -n (linux) or arp -a (windows).Įdit: you ask in comments how to get the output of an external command - one way is to use backticks, e.g. The client MAC address will not be available to you except in one special circumstance: if the client is on the same ethernet segment as the server. Replace phpMyAdmin with Adminer and you will get a tidier user interface. You can get the client IP from $_SERVER Client MAC address Adminer is available for MySQL, MariaDB, PostgreSQL, SQLite, MS SQL, Oracle. Server MAC addressįor the MAC address, you could parse the output of netstat -ie in Linux, or ipconfig /all in Windows. ![]() From that information file, we have to access only the physical address. You can get the server IP address from $_SERVER. How to get MAC address using system command in PHP The system () command gathers the information from the configuration file ( ipconfig file).
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |