Code: Select all
<a href="<?php echo $applink ?>">Download the <?php echo $appname ?></a>
Code: Select all
<a href="<?php echo $applink ?>">Download the <?php echo $appname ?></a>
Code: Select all
<?php
// Create a WURFL Cloud Config
$config = new WurflCloud_Client_Config();
// Set your API Key here
$config->api_key = 'xxxxxx:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
// Create a WURFL Cloud Client
$client = new WurflCloud_Client_Client($config, new WurflCloud_Cache_Null());
// Detect the visitor's device
$client->detectDevice();
$os = $client->getDeviceCapability('device_os');
if ($os == 'Android') {
// Show Android app link
} else if ($os == 'iOS') {
// Show iOS app link
}
Code: Select all
else {}
Code: Select all
else if ($os == 'Other Smartphone OS')
Code: Select all
if ($os == 'Android') {
// Show Android app link
} else if ($os == 'iOS') {
// Show iOS app link
} else if ($os == "RIM OS") {
// Show BlackBerry app link
} else if ($os == "Windows Mobile OS" || $os == "Windows Phone OS") {
// Show Windows app link
} else {
// No app available
}
Users browsing this forum: No registered users and 3 guests