| android | iphone | ipod | mobi | palm | palmos | pocket | portalmmm | ppc; | smartphone | sonyericsson | sqh | spv | symbian | treo | up. browser | up. link | vodafone | windows ce | xda _)/I ', $ _ SERVER ['HTTP _ USER_AGENT']) {// check USER_AGENTReturn true;} Else {Return false;} }
There is still a problem after the test. If you do not know it, you can see the wordpress function. php file.
The Code is as follows:
Ec (2); nbsp; the Code below copies the code functionmatchdomain ($ q) {preg_match ([a-z0-9] (w | }? [A-z0-9] | [a-z0-9]).) {1 ,} (aero | arpa | asia | biz | cat | com | coop | co | edu | gov | info | int | jobs | mil | mobi | mu script ec (2 ); script
The Code is as follows:
Function matchdomain ($ q ){Preg_match ('/([a-z0-9] (w | }? [A-z0-9] | [a-z0-9]).) {1 ,} (aero | arpa | asia | biz | cat | com | coop | co | edu | go
This article mainly introduces functions for detecting ip addresses and domain names in php and js, so that you can detect ip addresses and domain names in programs. For more information, see
This article mainly introduces functions for detecting ip addresses and domain names in php and js, so that you can detect ip addresses and domain names in programs. For more information, see
Php ip address format Detection Function
The Code is as follows:
Function checkIp ($ ip ){$ Ip = str_replace
If someone else writes a function in the thinkphp project, I wonder why this function serves.
function is_mobile() { $user_agent = $_SERVER['HTTP_USER_AGENT']; $mobile_agents = Array("240x320","acer","acoon","acs-","abacho","ahong","airness","alcatel","amoi","android","applewebkit/525","applewebkit/532","asus","audio","au-mic","avantogo","becker","benq","bilbo","bird","blackberry","blazer","bleu","cdm-","compal","coolpad","danger","dbtel","dopod","elaine","eric","etouch","fly ","
/International Broadcasting Conference8. IEEE Wireless Communications Networking conference/wcnc/ieee Wireless communications and web conferencing9. SPIE Conference on visual Communications and Image Processing/vcip/spie visual communication and Imaging Conference10, International Symposium on Wireless Personal Multimedia COMMUNICATIONS/WPMC/wireless Personal Multimedia Communication International Symposium11. IEEE International Conference on third Generation Wireless and beyond/3g and beyond/i
Determine whether the device is a mobile phone device in various languages, and determine whether the device is a mobile phone device in different languages.
This website is used in various languages to determine whether it is a mobile phone device.
Http://detectmobilebrowsers.com/
Example: C # determine whether it is
protected void Page_Load(object sender, EventArgs e) { string[] mobileAgents = { "iphone", "ipad",
In the past, calibre was used to convert the e-book format first, then convert it, copy the converted file, and rename it.
Although batch import and conversion are supported, copying and renaming must be processed. Later, we found that calibre had its own command line conversion tool, and wrote a batch processing tool to convert all the specified formats of e-books in a folder in batches.
Copy the following code to notepad, save it as a. BAT file, copy it to the e-book folder, and double-click i
PHP Determines if a user is accessing a mobile phone
With the popularity of mobile devices, the site will also usher in more and more mobile device access. Adapt to the PC's page, many times the user is not friendly to the phone, then sometimes we need to determine whether users use mobile phone access, if it is mobile phone, jump to the designated mobile phone-friendly page. Here's how to tell if a user is using a mobile phone to access it.
The custom functions are as follows:
Check if Wapfu
20140802154525Recently added Zhang Datu on the homepage
The display on the computer is not bad, but on the phone it's called a garbage.
Since the width is certain, the display on the phone and pad completely destroys the beauty
So I decided to hide the picture on the phone/pad.
Self Write function hide
Self-write function hiding is a more complex method, not recommended, but if you are using WP 3.4 version, then you can only use this method
1, edit the theme of the function.php, add the fo
In the website user data statistics, we often need to obtain the user browser type and the operating system type, this article mainly introduces is based on the PHP to judge the client type, has the need friend to be possible to understand.
Method One:
/** * To determine whether it belongs to the PC or the mobile end * @author discuz3x * @lastmodify According to the various browser-specific strings contained in PHP's $_server[' http_user_agent ')
2014-04-09 * @return BOOL/function Checkmo
With the popularity of mobile devices, the site will also usher in more and more mobile devices access. Used to adapt to the PC page, often unfriendly to mobile phone users, then sometimes, we need to determine whether the user to access the phone, if it is a mobile phone, jump to the designated mobile friendly page. Here is a brief introduction, how to determine whether users use mobile phone access.
The custom functions are as follows:
Copy Code code as follows:
$agent = Check_wa
With the popularity of mobile devices, the site will also usher in more and more mobile devices access. Used to adapt to the PC page, often unfriendly to mobile phone users, then sometimes, we need to determine whether the user to access the phone, if it is a mobile phone, jump to the designated mobile friendly page. Here is a brief introduction, how to determine whether users use mobile phone access.
The custom functions are as follows:
$agent = Check_wap ();
if ($agent)
{
header ('
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.