PHP Code:
function mobile_phone($_mob_ua)
{
$_position=strpos($_mob_ua,"Nokia");
if($_position)$_mob_ua = substr($_mob_ua, $_position,25);
else $_mob_ua=$_mob_ua;
$phone = explode ('/', $_mob_ua);
return $phone[0];
}
Code:
echo 'Best for '.mobile_phone($_SERVER['HTTP_USER_AGENT']).' ';
No comments:
Post a Comment