Sup guys, so I just wrote this PHP script for my own needs and decided to share with you. I didn't want to use handsetdetect as they charge after a few k detections.
Basically what it does is it takes both DEVICE & BRAND token from your
So here is example of your Voluum landing page link that you should set up:
http:/yourlink.com/somedir/otherdir/?brand={brand}&model={model}
This link will pass for example ?brand=Apple&model=iPhone. Now with PHP we extract this.
My code:
<?php
if (isset($_GET['brand']) || isset($_GET['model'])) {
$brand = $_GET['brand'];
$model= $_GET['model'];
$dev = $brand." ".$model;
}
else
{
$iphone = strpos($_SERVER['HTTP_USER_AGENT'],"iPhone");
$android = strpos($_SERVER['HTTP_USER_AGENT'],"Android");
$palmpre = strpos($_SERVER['HTTP_USER_AGENT'],"webOS");
$berry = strpos($_SERVER['HTTP_USER_AGENT'],"BlackBerry");
$ipod = strpos($_SERVER['HTTP_USER_AGENT'],"iPod");
$ipad = strpos($_SERVER['HTTP_USER_AGENT'],"iPad");
$windowsphone = strpos($_SERVER['HTTP_USER_AGENT'],"IEMobile");
if ($iphone) {
$dev = "iPhone";
}
else if ($android) {
$dev = "Android";
}
else if ($palmpre) {
$dev = "Palm";
}
else if ($berry) {
$dev = "BlackBerry";
}
else if ($ipod) {
$dev = "iPod Touch";
}
else if ($ipad) {
$dev = "iPad";
}
else if ($windowsphone) {
$dev = "Windows Phone";
}
else if (!$android || !$palmpre || !$berry || !$ipod || !$ipad || !$windowsphone) {
$dev = "Smartphone";
}
}
?>
Very handy script mate, thanks for sharing!