CodeIgniter Forums
how can i get system mac address - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forum-5.html)
+--- Forum: General Help (https://forum.codeigniter.com/forum-24.html)
+--- Thread: how can i get system mac address (/thread-67854.html)



how can i get system mac address - demonicinn - 04-17-2017

i'm using this code

function get_real_mac_addr(){
system('ipconfig /all');
$mycom=ob_get_contents();
$findme = "Physical";
$pmac = strpos($mycom, $findme);
$mac=substr($mycom,($pmac+36),17);
return $mac;
 }


its working in localhost and get mac address but in live server its not working

how can i get mac address in live server??


RE: how can i get system mac address - Diederik - 04-17-2017

on a regular shared hosting server php functions like system(), exec() etc are disabled for security reasons.


RE: how can i get system mac address - demonicinn - 04-17-2017

ok then how can i get mac address on shared hosting??


RE: how can i get system mac address - Diederik - 04-18-2017

You should ask your hosting provider for this kind of support.