| |
|
Welcome to KnowledgeSutra - Dear Guest | |
Check For Mobile Browser
#1
Posted 07 January 2009 - 03:43 AM
#2
Posted 07 January 2009 - 04:20 AM
For example, with Gmail there is gmail.com and the other is mobile.gmail.com I think. Or it's something like that.
#4
Posted 07 January 2009 - 04:42 AM
#5
Posted 07 January 2009 - 05:35 AM
Now you just need to code what type of broswers your looking for and since its mobile broswers your after heres a list of user agents so far. http://www.zytrax.co...mobile_ids.html
Use preg_match() to check and redirect as needed.
heres a sample of my code below. I think yours will have to be much longer to include all mobile browsers. That is if you want to check for all right?
$ua = $_SERVER['HTTP_USER_AGENT'];
$pattern = "/msie\s(5\.[5-9]|6\.[0-9])/i";
if(preg_match($pattern,$ua))
{
header("location: redirect.php");
}
edit: I'm not sure if preg_match can take arrays as the pattern, if it can then you can setup an array of all those broswer strings. easy
Update:***
Actually someone has already written some code for this. http://detectmobilebrowsers.mobi/ I think this would be alot easier then trying to preg_match all on your own. GL
Edited by sonesay, 07 January 2009 - 05:46 AM.
#6
Posted 07 January 2009 - 08:16 PM
#8
Posted 25 January 2009 - 08:44 PM
Edited by Antv912, 25 January 2009 - 08:44 PM.
#9
Posted 20 November 2009 - 02:35 PM
I have published a new mode to detect devices in any programming language (JSP, PHP, Perl, Python...), it's called Apache Mobile Filter is an Apache module (http://modules.Apach...rch.Php?id=1787) that detect mobile device and also can adapt the images to the screen size of device.For more info: http://www.idelfusch...filter-v2x.html
-reply by Idel
#10
Posted 21 November 2009 - 02:15 AM
Tramposch, on Jan 7 2009, 09:13 AM, said:
i think todays mobile browsers have the enough capability to handle big pages.like opera mini or bolt browser.it can show you the pages as you are watching it in your pc with a minor limitation.only the problem is small screens.
so many times i have made payments and watched online movies also with this bolt browser.so whats the need to make a mobile site fro your web site.any way,if you create it.y dont you make it with m.domain name.your tld (like m.trap17.com) it looks good also and anyone can understand that it is for mobile only.all the best
Reply to this topic

1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users
















