Mobile Detection - view full site option

Soldato
Joined
30 Nov 2005
Posts
3,084
Location
London
Been trying to look for some PHPcode that detects mobiles and redirects them. However, I would like to give them an option to view the full site as well, there doesent seem to be an existing code samples that include this.

Any ideas?
 
Thanks for the link but is there not a simple method.

I was thinking that maybe the user is redirected to a mobile site then with a "Full Site" link that uses GET then via PHP reads the URL and if the URL contains the term that it loads the full site instead?

Though I could do with some help on the coding on this, if the above is a viable method.
 
Why not check using the htaccess file? You could have a piece of code that checks for the resulting GET value and add that to a session. If the user then selects to view the normal site you can reset the value in the session to suit.
 
Ok this is the approach I'm intending to take (although I haven't got all the redirect aspects sorted yet and theres probably other ways :)) is make 2 'homepages', one called index.html (the one you go to with web address) and one called home.html which will both be identical except for the redirect script. On the mobile site just stick an additional link for the desktop version pointing to home.html which will then take you to the full version.
 
Back
Top Bottom