I already have a code that redirects users to the mobile site from which they are using the device. Important: This means that the mobile site and the entire site have the same URL: there is no m.example.com or mobile.example.com --- just example.com
function _check () {$ Agent = $ _SERVER ["HTTP_USER_AGENT"]; $ Mobile = false; $ Agent = array ("Alcatel", "Blackberry", "HTC", "LG", "Motorola", "Nokia", "Palm", "Samsung", "Sony Ericsson", "ZTE", "Mobile" "IPhone", "iPod", "Mini", "Playstation", "Doomo", "Beyond", "Vodafone", "Sharp", "Kindle", "Nexus", "Windows Phone"); Foreign exchange ($ agent as $ A) {if (strip ($ agent, $ one)!) == incorrect) $ {return $$; $} $ Mobile return; } Now I want to create a link which is clicked once, will set the $ mobile variable to false so that the entire site is shown instead of the mobile site ( Because the same URL in both)
Do anyone know that when a link is clicked, how to detect $ Mobile Variables to set a false?
Thanks in advance. To use cookies in your test code, first check to see if the cookie is set, and then
/ Em> User Agents If the cookie is set, set $ mobile incorrectly and do not check any other - otherwise, do not come to check user agents.
When your user clicks on the "See complete site" link, set a cookie for them so that your code knows how to abort your user agent check.
Comments
Post a Comment