Newbie - Silly Question
Posted: Fri Jun 08, 2012 10:04 am
Hi
I have just signed up to WURFL Cloud and I have downloaded the php files and created the quick example below.
<?php
// Include the WURFL Cloud Client
// You'll need to edit this path
require_once '../Client/Client.php'; What do I need to place here
// Create a configuration object
$config = new WurflCloud_Client_Config();
// Set your WURFL Cloud API Key
$config->api_key = 'xxxxxx:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
// Create the WURFL Cloud Client
$client = new WurflCloud_Client_Client($config);
// Detect your device
$client->detectDevice();
// Use the capabilities
if ($client->getDeviceCapability('is_wireless_device')) {
echo "This is a mobile device";
} else {
echo "This is a desktop device";
}
?>
I have just signed up to WURFL Cloud and I have downloaded the php files and created the quick example below.
<?php
// Include the WURFL Cloud Client
// You'll need to edit this path
require_once '../Client/Client.php'; What do I need to place here
// Create a configuration object
$config = new WurflCloud_Client_Config();
// Set your WURFL Cloud API Key
$config->api_key = 'xxxxxx:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
// Create the WURFL Cloud Client
$client = new WurflCloud_Client_Client($config);
// Detect your device
$client->detectDevice();
// Use the capabilities
if ($client->getDeviceCapability('is_wireless_device')) {
echo "This is a mobile device";
} else {
echo "This is a desktop device";
}
?>