Return to Snippet

Revision: 63354
at April 30, 2013 20:33 by stianlagstad

Initial Code
function isItAndroid()
	$ua = strtolower($_SERVER['HTTP_USER_AGENT']);
	if(stripos($ua,'android') !== false) return true;
	else return false;

Initial URL

Initial Description
This simple functions scans the user agent for the word "android" and returns true if found. Useful if there's something you only want android visitors to see (or not see).

Initial Title
Function to detect if the visitor is on an android device

Initial Tags
php, android

Initial Language