Created
January 26, 2020 16:29
-
-
Save rslahmed/75bb98eb82f85248822fbb20d5a232d1 to your computer and use it in GitHub Desktop.
Get IP and Mac Address
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// get mac address | |
$MAC = exec('getmac'); | |
$MAC = strtok($MAC,' '); | |
echo $MAC; | |
// get ip address | |
$IP = $_SERVER['REMOTE_ADDR']; | |
echo $IP; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment