We have a site developed in PHP. It is working just fine. We have used JQuery for every kind of situation like slide shows, menus, etc.
This site contains a lot of images which are large in size. because of this when viewed in a mobile phone user has to scroll a lot.
How can we recognize whether the client (browser) trying to access our site is a mobile phone or a standard PC.
Is there any standard way to build site for such situations?
TIA
You should look at Tera-WURFL, it is a PHP & MySQL-based software package that detects mobile devices and their capabilities. Here is the Tera-WURFL code that you would use to detect if a request is coming from a mobile device:
<?php
require_once("TeraWurfl.php");
$wurflObj = new TeraWurfl();
$wurflObj->GetDeviceCapabilitiesFromAgent();
if($wurflObj->capabilities['product_info']['is_wireless_device']){
echo "This is a mobile device";
}else{
echo "This is a desktop browser";
}
?>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With