<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Steve Jobs &#8211; stoimen&#039;s web log</title>
	<atom:link href="/tag/steve-jobs/feed/" rel="self" type="application/rss+xml" />
	<link></link>
	<description>on web development</description>
	<lastBuildDate>Tue, 13 Feb 2018 08:18:15 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.0.3</generator>
	<item>
		<title>PHP: detecting mobile device</title>
		<link>/2010/03/09/php-detecting-mobile-device/</link>
		<comments>/2010/03/09/php-detecting-mobile-device/#comments</comments>
		<pubDate>Tue, 09 Mar 2010 09:37:16 +0000</pubDate>
		<dc:creator><![CDATA[Stoimen]]></dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Computing]]></category>
		<category><![CDATA[FTP clients]]></category>
		<category><![CDATA[Gecko]]></category>
		<category><![CDATA[Google Chrome]]></category>
		<category><![CDATA[Google Inc.]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Mac OS X 10.5]]></category>
		<category><![CDATA[Mach]]></category>
		<category><![CDATA[Macintosh]]></category>
		<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[Mozilla Firefox]]></category>
		<category><![CDATA[safari]]></category>
		<category><![CDATA[Steve Jobs]]></category>
		<category><![CDATA[Technology/Internet]]></category>
		<category><![CDATA[United States]]></category>
		<category><![CDATA[WebKit]]></category>

		<guid isPermaLink="false">/?p=1214</guid>
		<description><![CDATA[HTTP_USER_AGENT Beside that most of the responses of $_SERVER[&#8216;HTTP_USER_AGENT&#8217;] may return, it appears that this is the most reliable way to track down a user agent with PHP. It is weird that most of the clients, i.e. Safari and Chrome will return something with Mozilla in it&#8217;s strings, but however it&#8217;s enough to track the &#8230; <a href="/2010/03/09/php-detecting-mobile-device/" class="more-link">Continue reading <span class="screen-reader-text">PHP: detecting mobile device</span> <span class="meta-nav">&#8594;</span></a><div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href="/2010/03/22/php-mobile-devices-http_user_agent-strings/" rel="bookmark" title="PHP: Mobile Devices HTTP_USER_AGENT Strings">PHP: Mobile Devices HTTP_USER_AGENT Strings </a></li>
<li><a href="/2010/03/18/mobile-internet-users-are-getting-more-important/" rel="bookmark" title="Mobile Internet Users are Getting More Important">Mobile Internet Users are Getting More Important </a></li>
<li><a href="/2010/02/24/storing-javascript-objects-in-html5-localstorage/" rel="bookmark" title="Storing JavaScript objects in html5 localStorage">Storing JavaScript objects in html5 localStorage </a></li>
<li><a href="/2010/03/17/stop-coding-iphone-apps-begin-with-html5-mobile-sites/" rel="bookmark" title="Stop Coding iPhone Apps, Begin with HTML5 Mobile Sites">Stop Coding iPhone Apps, Begin with HTML5 Mobile Sites </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<h2>HTTP_USER_AGENT</h2>
<p>Beside that most of the responses of <strong>$_SERVER[&#8216;HTTP_USER_AGENT&#8217;]</strong> may return, it appears that this is the most reliable way to track down a user agent with PHP. It is weird that most of the clients, i.e. Safari and Chrome will return something with Mozilla in it&#8217;s strings, but however it&#8217;s enough to track the &#8220;chrome&#8221; or &#8220;safari&#8221; sub strings.</p>
<p>All the examples bellow are from Mac OS X:</p>
<p>Firefox 3.6:</p>
<pre lang="html">
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6
</pre>
<p><em><strong>Note</strong>: there are both Mozilla and Firefox sub strings!</em></p>
<p>Safari 4:</p>
<pre lang="html">
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_8; bg-bg) AppleWebKit/531.21.8 (KHTML, like Gecko) Version/4.0.4 Safari/531.21.10
</pre>
<p>Chrome:</p>
<pre lang="html">
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_8; en-US) AppleWebKit/532.9 (KHTML, like Gecko) Chrome/5.0.307.11 Safari/532.9
</pre>
<p><em><strong>Note</strong>: Here they are Mozilla, Chorme and Safari!!!</em></p>
<p>Opera:</p>
<pre lang="html">
Opera/9.80 (Macintosh; Intel Mac OS X; U; en) Presto/2.2.15 Version/10.10
</pre>
<h2>The day of mobile</h2>
<p>Nowadays it&#8217;s normal to make a site with the presumption it will be visible from mobile. The war between Nexus One from Google and iPhone from Apple is just beginning and with all those devices with wide screens everything&#8217;s becoming more complicated.</p>
<h2>User agent strings from Nexus One and iPhone</h2>
<p>Both are weird, but both contain the keyword &#8211; &#8220;mobile&#8221; and that may help you make a check with something like this PHP snippet:</p>
<pre lang="php">
<?php
$mobile = !!(FALSE !== strstr(strtolower($_SERVER['HTTP_USER_AGENT']), 'mobile'));
?>
</pre>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href="/2010/03/22/php-mobile-devices-http_user_agent-strings/" rel="bookmark" title="PHP: Mobile Devices HTTP_USER_AGENT Strings">PHP: Mobile Devices HTTP_USER_AGENT Strings </a></li>
<li><a href="/2010/03/18/mobile-internet-users-are-getting-more-important/" rel="bookmark" title="Mobile Internet Users are Getting More Important">Mobile Internet Users are Getting More Important </a></li>
<li><a href="/2010/02/24/storing-javascript-objects-in-html5-localstorage/" rel="bookmark" title="Storing JavaScript objects in html5 localStorage">Storing JavaScript objects in html5 localStorage </a></li>
<li><a href="/2010/03/17/stop-coding-iphone-apps-begin-with-html5-mobile-sites/" rel="bookmark" title="Stop Coding iPhone Apps, Begin with HTML5 Mobile Sites">Stop Coding iPhone Apps, Begin with HTML5 Mobile Sites </a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>/2010/03/09/php-detecting-mobile-device/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
