I've set up a free account to test WURFL cloud.
following the php example, i have connected to the api no problem.
When i try to grab these two properties though :
Code: Select all
$WURFLWidth = $client->getDeviceCapability('resolution_width');
$WURFLHeight = $client->getDeviceCapability('resolution_height');
The values i am expecting are 1680(w) and 1050(h)
Does anyone have any ideas why these might be incorrect ?
Thanks
php is below:
Code: Select all
<?php
// Include the WURFL Cloud Client
require_once 'WURFL/Client/Client.php';
// Create a configuration object
$config = new WurflCloud_Client_Config();
// Set your WURFL Cloud API Key
$config->api_key = '123459:dnYaEJfeuqmRp41DcyxrWU5SCv6jthON';
// Create the WURFL Cloud Client
$client = new WurflCloud_Client_Client($config);
// Detect your device
$client->detectDevice();
// Use the capabilities
if ($client->getDeviceCapability('ux_full_desktop')) {
echo "This is a desktop web browser";
} else {
echo "This is a mobile device";
}
$WURFLWidth = $client->getDeviceCapability('resolution_width');
$WURFLHeight = $client->getDeviceCapability('resolution_height');
echo $WURFLWidth;
echo $WURFLHeight;
?>