Recommended methods for modifying public IP addresses and mac addresses

Source: Internet
Author: User
Recently, I need to use php to write a simulation program. this program needs to constantly change the public IP address and modify the mac address of the local machine. After a period of research, I found that I knew what to say. I would like to share this method with you here.

Recently, I need to use php to write a simulation program. this program needs to constantly change the public IP address and modify the mac address of the local machine.

After a period of research, I found that I knew what to say. I would like to share this method with you here. I hope this method can be implemented somewhere at a certain time.

It helps readers.

I. Public network address

The Internet address is relative to the intranet address. Intranet addresses are in the following formats: 192.168.x.x, 10. x, 172.16.x.x. Take home wireless routing as an example. the IP addresses displayed through ipconfig are all intranet addresses. You can view the public network by accessing ip138.com.

How to modify a public IP address

I am using the simplest method to modify my IP address.

1. I first applied for an adsl dial-up bandwidth. RMB 120 per month

2. modify the IP address by dialing again

The related code is as follows:

 

 

This program implements automatic dialing by calling external rasdial.

II. Mac address

Mac address Nic address. A mac address is used to identify a unique computer. In other words, a computer only has a unique mac address.

This is also a method that many programs use to mark independent users. However, mac addresses are divided into physical mac addresses and driver layer mac addresses.

The mac address of the driver layer can be modified. The mac address is the same as the mac address of the physical Nic before it is modified.

The program reads mac and does not directly obtain the physical mac, but the mac of the driver layer. So we can achieve our goal by modifying the driver layer mac.

How to modify a mac address

You can modify the mac address or download the current mac address modifier by modifying the registry.

1. download the tmac program. For http://www.technitium.com/tmac/index.html

2. use tmac-n local-s-r-re-to generate a mac address. local is the local connection name.

The related code is as follows:

 

 

3. PHP Long Run mode

The php program runs automatically after a period of time. to keep php running, you can modify the max_execute_time parameter in php. ini.

Modify max_execution_time = 0

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.