Quote from: BobRay at Jan 22, 2014, 08:11 PMThe code you posted is valid except for the HTML comment tags.
The beginning should be
and this line at the end should be removed:
actually my code is:
<?php
// GET THE USER_AGENT
$ua = (isset($_SERVER) && array_key_exists('HTTP_USER_AGENT', $_SERVER))
? $_SERVER['HTTP_USER_AGENT']
: false;
// TRUE IF MOBILE DEVICE
$ismobile = (isset($_SERVER['AMF_ISMOBILE']))
? $_SERVER['AMF_ISMOBILE']
: false;
if (stristr($ua, 'windows') != '') $os = 'win';
if (stristr($ua, 'mac') != '') $os = 'mac';
if (stristr($ua, 'linux') != '') $os = 'linux';
if (stristr($ua, 'android') != '') $os = 'android';
if (stristr($ua, 'iphone') != '') $os = 'iphone';
if (stristr($ua, 'ipad') != '') $os = 'ipad';
$mobile = ($ismobile) ? ' mobile' : '';
if (strpos($ua, 'firefox') !== false) {
$ver = explode('/',$ua);
$ver = explode('.',$ver[count($ver)-1]);
$o = 'firefox ff-'.$ver[0].' ff-'.$os;
} elseif (stripos($ua, 'opr') !== false) {
$ver = explode('/',$ua);
$ver = explode('.',$ver[count($ver)-1]);
$o = 'opera opera-'.$ver[0].' opera-'.$os;
} elseif (stripos($ua, 'safari') !== false && stripos($ua, 'chrome') === false) {
$o = 'safari safari-'.$os;
} elseif (stripos($ua, 'chrome') !== false) {
$ver = explode('Chrome/',$ua);
$ver = explode('.',$ver[1]);
$o = 'chrome chrome-'.$ver[0].' chrome-'.$os;
} elseif (stripos($ua, 'msie') !== false) {
$ver = explode('MSIE ', $ua);
$ver = explode('.', $ver[1]);
$o = 'iexplore ie-'.$ver[0];
} else {
$o = 'browserunknown';
}
return $o;
maybe is fun or It is unbelievable but is not work i get same error:
Parse error: syntax error, unexpected T_VARIABLE in /home/user/public_html/core/cache/includes/elements/modsnippet/91.include.cache.php on line 9