Modify the User-Agent of the browser in php to disguise your browser and operating system.

Source: Internet
Author: User
Modify the User-Agent of the browser to disguise your browser and operating system. Both of them can obtain information such as User-Agents and IP. It is best to use regular expressions to filter and remove information.

Modify the User-Agent of the browser to disguise your browser and operating system. Both of them can obtain information such as User-Agents and IP. It is best to use regular expressions to filter and remove information.

The method for obtaining HTTP_USER_AGENT is simple, such as the php code:
The Code is as follows:
?>

The Code is as follows:
?>

Both of them can obtain information such as User-Agents and IP address. It is best to use a regular expression to filter and remove information.

----- User-Agents List -----

Internet Explorer 6
Internet Explorer 7
Internet Explorer 8
Firefox
Chrome
Safari
Netscape
Opera
Maxthon
360SE
OmniWeb

For more information about User-Agents, see useragents. xml.

With the information in this file, any browser or operating system can be disguised.

Use User-Agents:

FireFox: [the User-Agent switcher FireFox extension is recommended]
Enter "about: config" in the address bar and press Enter.
Settings: general. useragent. override-> Custom UA information.

Chrome
Add the startup parameter-user-agent = "UA information" to the properties of the startup EXE icon.

Safari
Menu bar-> Edit-> Preferences-> Advanced-> Show Develop menu in menu bar;
Menu Bar-> Develop-> User-Agent-> UA information.

Maxthon
Toolbar-> Tools-> travel settings center-> advanced options-> Custom UA information.

Opera
Enter "opera: config" in the address bar and press Enter.
Settings: User-Agent-> Custom ID 0-5
Note: [0 Default 1 Opera 2 Mozilla, Opera detectable 3 Internet Explorer, Opera detectable 4 Mozilla, Opera hidden 5 Internet Explorer, Opera hidden]

IPhone
Replace the Mozilla/5.0 string of the/System/Library/Frameworks/WebKit. framework/WebKit file with the custom UA information.

The settings of IE browser need to be modified

Location of the User-Agent
Under [HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionInternet SettingsUser-AgentPost Platform], create a new string value and leave the content blank. The name of the character you want to add in the User-Agent is used as an example. Modify the corresponding REG file as follows:
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionInternet SettingsUser-AgentPost Platform]
"Repeated larokre2" = ""

After modification, restart IE.

The user-agent value of IE. The following is a combination of the following addresses + some default values
HKCUSoftwareMicrosoftWindowsCurrentVersionInternet SettingsUser-AgentPost Platform
HKLMSoftwareMicrosoftWindowsCurrentVersionInternet SettingsUser-AgentPost Platform
HKLMSoftwareMicrosoftWindowsCurrentVersionInternet Settings5.0User-AgentPost Platform

IE8 User-Agents:

IE8 on Windows Vista (compatible browsing)
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; Trident/4.0)

IE8 on Windows Vista
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0)

IE8 on Windows 7
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0)

64-bit IE on 64-bit Windows 7:
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Win64; x64; Trident/4.0)

32-bit IE on 64-bit Windows 7:
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0)

By modifying the User-Agent, you can also perform a perfect disguise: Operating System, browser, Spider, mail client, link check, analyzer, RSS reader, and other client information.
Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

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.