Skip to content

Commit

Permalink
random mac2
Browse files Browse the repository at this point in the history
  • Loading branch information
lintangtimur committed Sep 9, 2020
1 parent 279811c commit aace558
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/helper/function.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,13 @@ function gen_uuid()
mt_rand(0, 0xffff)
);
}

/**
* generate random MAC Address
*
* @return string
*/
function gen_mac()
{
return implode(':', str_split(substr(md5(mt_rand()), 0, 12), 2));
}

0 comments on commit aace558

Please sign in to comment.