How to implement the function of PHP user_agent judgment?
-
In my website, some pages are only open to ios, I got the user_agent of ios, I hope that users who are not ios features, do not use cached files, I use this in my PHP theme:
$agent = $_SERVER[‘HTTP_USER_AGENT’];
If (strpos($agent,’iphone’) == false){
Print_r(‘not ios’);
Return;
}How can I modify which part of the plugin code to let him implement this function?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘How to implement the function of PHP user_agent judgment?’ is closed to new replies.