<?php
require_once (MacAddress.php");
$mac = new MacAddress ('00:FF:AB:CC:DD:FF');
echo $mac->output ('.',4)."\n"; // 00FF.ABCC.DDFF
echo $mac->output ('.',4,'lower')."\n"; // 00ff.abcc.ddff
echo $mac->output ('-',2,'upper')."\n"; // 00-FF-AB-CC-DD-FF
echo $mac->output (':',2,'lower')."\n"; // 00:ff:ab:cc:dd:ff
$mac2 = new MacAddress ($mac->GetMacAddr()); // mac of eth0 of my server
echo $mac2->output (':',2,'lower')."\n"; // 00:50:56:ac:52:7b
echo $mac2->output ('.',4,'lower')."\n"; // 0050.56ac.527b
echo $mac2->output ('.',4,'upper')."\n"; // 0050.56AC.527B
?>
|