<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>Comments on: PHP: detecting mobile device</title>
	<atom:link href="/2010/03/09/php-detecting-mobile-device/feed/" rel="self" type="application/rss+xml" />
	<link>/2010/03/09/php-detecting-mobile-device/</link>
	<description>on web development</description>
	<lastBuildDate>Fri, 26 Oct 2018 21:40:18 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.0.3</generator>
	<item>
		<title>By: Sajjad</title>
		<link>/2010/03/09/php-detecting-mobile-device/comment-page-1/#comment-414395</link>
		<dc:creator><![CDATA[Sajjad]]></dc:creator>
		<pubDate>Sun, 24 Jul 2016 09:03:27 +0000</pubDate>
		<guid isPermaLink="false">/?p=1214#comment-414395</guid>
		<description><![CDATA[Great and helpful tutorial. Thanks for sharing this. I am using this function to detect mobile device for my website.

function mobile(){
if(stristr($_SERVER[‘HTTP_USER_AGENT’],’windows’)&#038;&#038;!stristr($_SERVER[‘HTTP_USER_AGENT’],’windows ce’)){
return false;
}
if(eregi(‘up.browser&#124;up.link&#124;windows ce&#124;iemobile&#124;mini&#124;mmp&#124;symbian&#124;midp&#124;wap&#124;phone&#124;pocket&#124;mobile&#124;pda&#124;psp’,$_SERVER[‘HTTP_USER_AGENT’])){
return true;
}
if(stristr($_SERVER[‘HTTP_ACCEPT’],’text/vnd.wap.wml’)&#124;&#124;stristr($_SERVER[‘HTTP_ACCEPT’],’application/vnd.wap.xhtml+xml’)){
return true;
}
if(isset($_SERVER[‘HTTP_X_WAP_PROFILE’])&#124;&#124;isset($_SERVER[‘HTTP_PROFILE’])&#124;&#124;isset($_SERVER[‘X-OperaMini-Features’])&#124;&#124;isset($_SERVER[‘UA-pixels’])){
return true;
}
$a=array(‘acs-‘,’alav’,’alca’,’amoi’,’audi’,’aste’,’avan’,’benq’,’bird’,’blac’,’blaz’,’brew’,’cell’,’cldc’,’cmd-‘,’dang’,’doco’,’eric’,’hipt’,’inno’,’ipaq’,’java’,’jigs’,’kddi’,’keji’,’leno’,’lg-c’,’lg-d’,’lg-g’,’lge-‘,’maui’,’maxo’,’midp’,’mits’,’mmef’,’mobi’,’mot-‘,’moto’,’mwbp’,’nec-‘,’newt’,’noki’,’opwv’,’palm’,’pana’,’pant’,’pdxg’,’phil’,’play’,’pluc’,’port’,’prox’,’qtek’,’qwap’,’sage’,’sams’,’sany’,’sch-‘,’sec-‘,’send’,’seri’,’sgh-‘,’shar’,’sie-‘,’siem’,’smal’,’smar’,’sony’,’sph-‘,’symb’,’t-mo’,’teli’,’tim-‘,’tosh’,’tsm-‘,’upg1′,’upsi’,’vk-v’,’voda’,’w3c ‘,’wap-‘,’wapa’,’wapi’,’wapp’,’wapr’,’webc’,’winw’,’winw’,’xda’,’xda-‘);
if(isset($a[substr($_SERVER[‘HTTP_USER_AGENT’],0,4)])){
return true;
}
}]]></description>
		<content:encoded><![CDATA[<p>Great and helpful tutorial. Thanks for sharing this. I am using this function to detect mobile device for my website.</p>
<p>function mobile(){<br />
if(stristr($_SERVER[‘HTTP_USER_AGENT’],’windows’)&amp;&amp;!stristr($_SERVER[‘HTTP_USER_AGENT’],’windows ce’)){<br />
return false;<br />
}<br />
if(eregi(‘up.browser|up.link|windows ce|iemobile|mini|mmp|symbian|midp|wap|phone|pocket|mobile|pda|psp’,$_SERVER[‘HTTP_USER_AGENT’])){<br />
return true;<br />
}<br />
if(stristr($_SERVER[‘HTTP_ACCEPT’],’text/vnd.wap.wml’)||stristr($_SERVER[‘HTTP_ACCEPT’],’application/vnd.wap.xhtml+xml’)){<br />
return true;<br />
}<br />
if(isset($_SERVER[‘HTTP_X_WAP_PROFILE’])||isset($_SERVER[‘HTTP_PROFILE’])||isset($_SERVER[‘X-OperaMini-Features’])||isset($_SERVER[‘UA-pixels’])){<br />
return true;<br />
}<br />
$a=array(‘acs-‘,’alav’,’alca’,’amoi’,’audi’,’aste’,’avan’,’benq’,’bird’,’blac’,’blaz’,’brew’,’cell’,’cldc’,’cmd-‘,’dang’,’doco’,’eric’,’hipt’,’inno’,’ipaq’,’java’,’jigs’,’kddi’,’keji’,’leno’,’lg-c’,’lg-d’,’lg-g’,’lge-‘,’maui’,’maxo’,’midp’,’mits’,’mmef’,’mobi’,’mot-‘,’moto’,’mwbp’,’nec-‘,’newt’,’noki’,’opwv’,’palm’,’pana’,’pant’,’pdxg’,’phil’,’play’,’pluc’,’port’,’prox’,’qtek’,’qwap’,’sage’,’sams’,’sany’,’sch-‘,’sec-‘,’send’,’seri’,’sgh-‘,’shar’,’sie-‘,’siem’,’smal’,’smar’,’sony’,’sph-‘,’symb’,’t-mo’,’teli’,’tim-‘,’tosh’,’tsm-‘,’upg1′,’upsi’,’vk-v’,’voda’,’w3c ‘,’wap-‘,’wapa’,’wapi’,’wapp’,’wapr’,’webc’,’winw’,’winw’,’xda’,’xda-‘);<br />
if(isset($a[substr($_SERVER[‘HTTP_USER_AGENT’],0,4)])){<br />
return true;<br />
}<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stoimen</title>
		<link>/2010/03/09/php-detecting-mobile-device/comment-page-1/#comment-12534</link>
		<dc:creator><![CDATA[Stoimen]]></dc:creator>
		<pubDate>Tue, 09 Mar 2010 11:21:41 +0000</pubDate>
		<guid isPermaLink="false">/?p=1214#comment-12534</guid>
		<description><![CDATA[An interesting article about this HTTP_USER_AGENT string and its history you can find here: http://www.nczonline.net/blog/2010/01/12/history-of-the-user-agent-string/]]></description>
		<content:encoded><![CDATA[<p>An interesting article about this HTTP_USER_AGENT string and its history you can find here: <a href="http://www.nczonline.net/blog/2010/01/12/history-of-the-user-agent-string/" rel="nofollow">http://www.nczonline.net/blog/2010/01/12/history-of-the-user-agent-string/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stoimen</title>
		<link>/2010/03/09/php-detecting-mobile-device/comment-page-1/#comment-12532</link>
		<dc:creator><![CDATA[Stoimen]]></dc:creator>
		<pubDate>Tue, 09 Mar 2010 09:57:43 +0000</pubDate>
		<guid isPermaLink="false">/?p=1214#comment-12532</guid>
		<description><![CDATA[Actually get_browser() doesn&#039;t work on the fly. As the PHP docs says you have to have browscap.ini file setup. And if not only the old school HTTP_USER_AGENT remains working!

greetings,
stoimen]]></description>
		<content:encoded><![CDATA[<p>Actually get_browser() doesn&#8217;t work on the fly. As the PHP docs says you have to have browscap.ini file setup. And if not only the old school HTTP_USER_AGENT remains working!</p>
<p>greetings,<br />
stoimen</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mehul</title>
		<link>/2010/03/09/php-detecting-mobile-device/comment-page-1/#comment-12531</link>
		<dc:creator><![CDATA[mehul]]></dc:creator>
		<pubDate>Tue, 09 Mar 2010 09:56:08 +0000</pubDate>
		<guid isPermaLink="false">/?p=1214#comment-12531</guid>
		<description><![CDATA[Why don&#039;t you use the built-in method in PHP get_browser()? It works fine!]]></description>
		<content:encoded><![CDATA[<p>Why don&#8217;t you use the built-in method in PHP get_browser()? It works fine!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
