Skip to navigation Skip to content
资焰开发笔记

记录日常 方便查找

Main Navigation

php随机生成MAC地址

2018年1月5日By 资焰 php

php随机生成MAC地址代码,前三个为固定mac头,根据要用的更改

function mac_gen(){
	$array=array(
		0x1C,
		0x1C,
		0x1C,
		mt_rand(0x00, 0x7f),
		mt_rand(0x00, 0xff),
		mt_rand(0x00, 0xff)
	);
	return join(':',array_map(function($v){
		return sprintf("%02X",$v);
	},$array));
}
mac, mac地址

文章导航

React解决模态框子组件不自动更新问题
react componentWillReceiveProps 接收传参问题
近期文章
  • Failed to get D-Bus connection: Operation not permitted
  • js sleep
  • SSH、Git与Sourcetree
  • win server 2022激活
  • Linux下常用的端口转发工具
文章归档
  • 2025年一月
  • 2024年五月
  • 2024年四月
  • 2024年一月
  • 2023年十月
  • 2023年九月
  • 2023年六月
  • 2022年八月
  • 2022年四月
  • 2021年七月
  • 2021年四月
  • 2021年三月
  • 2020年十月
  • 2020年九月
  • 2020年二月
  • 2020年一月
  • 2019年十二月
  • 2019年十一月
  • 2019年七月
  • 2019年三月
  • 2018年八月
  • 2018年五月
  • 2018年三月
  • 2018年一月
分类目录
  • html
  • java
  • jquery
  • js
  • linux
  • mac
  • mysql
  • php
  • react
  • React Native
  • sublime text
  • vue
  • windows
  • 未分类
功能
  • 登录
  • 文章RSS
  • 评论RSS
  • WordPress.org
鲁ICP备15006223号-1
© 资焰开发笔记 2025 BasePress designed by ThemeCountry