Display client MAC on captive portal login page.
-
So maybe this is more of HTML/PHP thing, but I see the /usr/local/captiveportal/login.php has $clientmac… I uploaded my own html page in the captive portal for the login page. Now how do I access this variable in my html page to display it?
-
Lots of php in the default login page to look at. Should be trivial if you know the name of the variable you want.
-
I'm not sure how or what to do? I never really did HTML or php… How do I link the php functions in my HTML file?
-
on your captive portal form you can use the macaddress through this codes:
$arp=`arp $ipaddress`; #run the external command, break output into lines $lines = explode(" ", $arp); $macaddr = $lines[3]; #Actual code