mardi 3 septembre 2019

How to get logged in user's device physical address

I have a tutoring site where users can join as Tutor or Student. The site is in Laravel 5.4. After sign up, I want to restrict users to only logging from maximum three devices. I tried in php but that is giving me only my system's or server system's mac address.

ob_start();
system('ipconfig /all');
$mycom=ob_get_contents();
ob_clean();
$findme = "Physical";
$pmac = strpos($mycom, $findme);
$mac=substr($mycom,($pmac+36),17);
echo $mac;

Is there any way I can get Mac address of user's device? Is it legal to do? Please help.

Thanks in Advance.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire