There may be some incomplete information, and the complete code is not at the bottom? Php *** CreatedbyPhpStorm. * User: Inhere * Date: 2015227 * Use: (request source) Client information * File: Client. php * namespaceenvironment; *** Client
In php, HTTP_USER_AGENT is used to obtain user information, including the user's browser, operating system engineering, and whether the alex toolbar is installed. For more information, see.
1. When a user accesses the SERVER, use the PHP super
When the user sends an HTTP request, the version information that is browsed is also included in the HTTP request message:As shown, requesting a Google Plus request header contains the user's browser information:user-agent:mozilla/5.0 (Windows NT 6.1
This article mainly introduces PHP code summary for determining whether a visitor is a search engine spider or a common user. There are always a variety of methods suitable for you to prevent search engine spider from dragging the search engine to
This article mainly introduces PHP code summary for determining whether a visitor is a search engine spider or a common user. There are always one method that suits you, prevent search engine spider from dragging the search engine. 1. recommended
1. When a user accesses the SERVER, use the PHP Super global variable $ _ SERVER array field ['http _ USER_AGENT '] to obtain all information of the user The code is as follows:Copy code Echo $ _ SERVER ['http _ USER_AGENT '];?> Output
1. When the user accesses the server, use PHP's super global variable $_server array field [' Http_user_agent '] to get access to all of the user's information
$_server[' http_user_agent ' string when I visit:
mozilla/5.0 (Windows; U Windows NT 6.1;
Php checks whether the user accesses the code by phone, and php checks the access code. Php checks whether a user accesses the code through a mobile phone. with the popularization of mobile devices, more and more mobile devices will access the
In the previous case, we used to determine whether a user accesses a mobile phone or a computer, and then display the corresponding page to the user. Initially, js was used, but the accuracy was not high. finally, PHP was used for this purpose.
In the previous case, we used to determine whether a user accesses a mobile phone or a computer, and then display the corresponding page to the user. Initially, js was used, but the accuracy was not high. finally, PHP was used for this purpose.
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.