Quote:
Originally Posted by robwod
In your ad zone areas of the php/html, do a check if == mobile, then show the mobile code, else show the standard code.
|
Yap something like this:
Code:
<?php
$text = $_SERVER['HTTP_USER_AGENT'];
if (preg_match('/mobile|android|iphone|blackberry|brew|htc|j2me|lg| midp|mot|motorola|netfront|nokia|obigo|openweb|ope ra.mini|palm|psp|samsung|sanyo|sch|sonyericsson|sy mbian|symbos|teleca|up.browser|vodafone|wap|window s(\.ce)|webos/i', $text))
{
//echo "MOBILE<br>";
}
else
{
//do nothing or something else
// echo "NOT MOBILE";
}
?>