What technologies are used to identify PC access or mobile access? Wap mobile phone
What technologies are used to identify PC access or mobile access? Example
Reply to discussion (solution)
Generally, check the sent header.
There is also the resolution, for small screens.
Print_r ($ _ SERVER );
You can use different devices to access your website.
Upstairs is right.
$ _ SERVER ['http _ USER_AGENT '];
Like !!! Try it now
$ Ua = strtolower ($ _ SERVER ['http _ USER_AGENT ']);
$ Uachar = "/(nokia | sony | ericsson | mot | samsung | sgh | lg | philips | panasonic | alcatel | lenovo | cldc | midp | mobile | ipad | iphone | android) /I ";
If ($ ua = ''| preg_match ($ uachar, $ ua ))&&! Strpos (strtolower ($ _ SERVER ['request _ URI ']), 'wap '))
{
// Mobile access
Header ("Location: m.manshijian.com ");
Exit;
} Else {
// Pc
}
Http://www.16code.com/webapp-developer/