hello every body!
i have my term project on busines system,
i want to include the mobile functionalty to my side,
from where i start work,i completely dont know any thing about it,please help me and guide me how to work on it
thnak you
how to include mobile functionality to my website
Moderator: General Moderators
- social_experiment
- DevNet Master
- Posts: 2793
- Joined: Sun Feb 15, 2009 11:08 am
- Location: .za
Re: how to include mobile functionality to my website
A point to take note of is if a user will be able to view your site on their mobile device. If you get that right functionality shouldn't be a problem because the mobile's browser can handle many things that your pc browser can (html forms for example).
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
Re: how to include mobile functionality to my website
Detect if its a mobile device either using CSS (@media handheld) - http://webdesign.about.com/od/css/qt/tipcssmedia.htm OR php something like:
The issue with the php way is that there are/could be many many more user agents. I would suggest the CSS method.
Bare in mind you will more it to be much more lightweight.
There's my input.. hope it helps
Code: Select all
<? if (
stristr($ua, "Windows CE") or
stristr($ua, "AvantGo") or
stristr($ua,"Mazingo") or
stristr($ua, "Mobile") or
stristr($ua, "T68") or
stristr($ua,"Syncalot") or
stristr($ua, "Blazer") ) {
$DEVICE_TYPE="MOBILE";
}
if (isset($DEVICE_TYPE) and $DEVICE_TYPE=="MOBILE") {
$location='mobile/index.php';
header ('Location: '.$location);
exit;
}
?> Bare in mind you will more it to be much more lightweight.
There's my input.. hope it helps
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Re: how to include mobile functionality to my website
Take a look at php-mobile-detect which is designed to detect mobile browser user agents.
See http://code.google.com/p/php-mobile-detect/
See http://code.google.com/p/php-mobile-detect/
Re: how to include mobile functionality to my website
Darn John... you always have a better solution.
Re: how to include mobile functionality to my website
http://tinysrc.net/
Zend Framework just added built in support, pretty cool. The only thing I can think of that you'd need to do is scale down images for "dumb phones" (non-smart phones, lol). Tiny SRC can do that. Droids/iphones can browse the full size page just fine, since they have zoom support.
The only other thing to be aware of besides that is iphone doesn't run flash, only droid. Both iphone & droid run javascript (jquery, etc.) but most other phones will not.
I prefer to use the CSS method, or just have the page use such lightweight graphics in the first place that it just runs on the phone natively in the first place. Most people with older type phones (non droid/iphone) won't browse the web very often anyways IMO.
Zend Framework just added built in support, pretty cool. The only thing I can think of that you'd need to do is scale down images for "dumb phones" (non-smart phones, lol). Tiny SRC can do that. Droids/iphones can browse the full size page just fine, since they have zoom support.
The only other thing to be aware of besides that is iphone doesn't run flash, only droid. Both iphone & droid run javascript (jquery, etc.) but most other phones will not.
I prefer to use the CSS method, or just have the page use such lightweight graphics in the first place that it just runs on the phone natively in the first place. Most people with older type phones (non droid/iphone) won't browse the web very often anyways IMO.