<?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: Browser.php &#8211; Detecting a user&#8217;s browser from PHP</title>
	<atom:link href="http://chrisschuld.com/projects/browser-php-detecting-a-users-browser-from-php/feed/" rel="self" type="application/rss+xml" />
	<link>http://chrisschuld.com</link>
	<description>personal musings on the composition of software</description>
	<lastBuildDate>Mon, 06 Sep 2010 02:10:03 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Chris Schuld</title>
		<link>http://chrisschuld.com/projects/browser-php-detecting-a-users-browser-from-php/#comment-2818</link>
		<dc:creator>Chris Schuld</dc:creator>
		<pubDate>Mon, 06 Sep 2010 02:10:03 +0000</pubDate>
		<guid isPermaLink="false">http://chrisschuld.com/?page_id=111#comment-2818</guid>
		<description>Hi Kemal,

Thank you for your comment, however, I disagree with your suggestion.  The Browser.php implementation is strictly a utility class to do the &quot;calculation.&quot;  How you implement your scaling, session storage, or even use Browser.php is up to you as the author of your solution.  Personally, I would only load the Browser.php file once to do a single calculation per visit rendering the __sleep and __wakeup (magic functions) worthless.  Let me know if you feel I am off base.

Thanks, Chris</description>
		<content:encoded><![CDATA[<p>Hi Kemal,</p>
<p>Thank you for your comment, however, I disagree with your suggestion.  The Browser.php implementation is strictly a utility class to do the &#8220;calculation.&#8221;  How you implement your scaling, session storage, or even use Browser.php is up to you as the author of your solution.  Personally, I would only load the Browser.php file once to do a single calculation per visit rendering the __sleep and __wakeup (magic functions) worthless.  Let me know if you feel I am off base.</p>
<p>Thanks, Chris</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kemal Delalić</title>
		<link>http://chrisschuld.com/projects/browser-php-detecting-a-users-browser-from-php/#comment-2808</link>
		<dc:creator>Kemal Delalić</dc:creator>
		<pubDate>Sun, 05 Sep 2010 13:13:33 +0000</pubDate>
		<guid isPermaLink="false">http://chrisschuld.com/?page_id=111#comment-2808</guid>
		<description>You should consider session-based storing implementation using __sleep() and __wakeup because the current solution isn&#039;t scalable at all.</description>
		<content:encoded><![CDATA[<p>You should consider session-based storing implementation using __sleep() and __wakeup because the current solution isn&#8217;t scalable at all.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vincent</title>
		<link>http://chrisschuld.com/projects/browser-php-detecting-a-users-browser-from-php/#comment-2802</link>
		<dc:creator>Vincent</dc:creator>
		<pubDate>Sat, 04 Sep 2010 20:31:14 +0000</pubDate>
		<guid isPermaLink="false">http://chrisschuld.com/?page_id=111#comment-2802</guid>
		<description>Brilliant work. Thank you very much for this class. I hope that this helps. I have noticed a small typo in version 1.9. Line 251 refers to &#039;browser&#039; rather than to &#039;platform&#039;.

Once agaon thanks for this excellent class.

Regards

Vincent</description>
		<content:encoded><![CDATA[<p>Brilliant work. Thank you very much for this class. I hope that this helps. I have noticed a small typo in version 1.9. Line 251 refers to &#8216;browser&#8217; rather than to &#8216;platform&#8217;.</p>
<p>Once agaon thanks for this excellent class.</p>
<p>Regards</p>
<p>Vincent</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: siva</title>
		<link>http://chrisschuld.com/projects/browser-php-detecting-a-users-browser-from-php/#comment-2708</link>
		<dc:creator>siva</dc:creator>
		<pubDate>Tue, 31 Aug 2010 12:35:25 +0000</pubDate>
		<guid isPermaLink="false">http://chrisschuld.com/?page_id=111#comment-2708</guid>
		<description>Hai, 
Could please tell me how to write a simplified OS Detection script in php, OS Detection in the sense,that user is using or viewing what OS may be ANdroid, Windows Mobile, Linux,
Desktop/Laptops OS, Smartphone OS/Mobile OS, Notebook OS...

 and please be in step by step</description>
		<content:encoded><![CDATA[<p>Hai,<br />
Could please tell me how to write a simplified OS Detection script in php, OS Detection in the sense,that user is using or viewing what OS may be ANdroid, Windows Mobile, Linux,<br />
Desktop/Laptops OS, Smartphone OS/Mobile OS, Notebook OS&#8230;</p>
<p> and please be in step by step</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sorin</title>
		<link>http://chrisschuld.com/projects/browser-php-detecting-a-users-browser-from-php/#comment-2678</link>
		<dc:creator>sorin</dc:creator>
		<pubDate>Sat, 28 Aug 2010 15:43:34 +0000</pubDate>
		<guid isPermaLink="false">http://chrisschuld.com/?page_id=111#comment-2678</guid>
		<description>Hello!
Thanks for the class, it&#039;s very usefull and works fine. I use it for creating visitors stats, in a larger web aplication wich captures also the visitor operation system and version, sections visited and so on.
If you just want to get the browser details using this class, you should have something like this:

getBrowser();
$browserVersion=$browser-&gt;getVersion();
?&gt;

Thanks again for this class.</description>
		<content:encoded><![CDATA[<p>Hello!<br />
Thanks for the class, it&#8217;s very usefull and works fine. I use it for creating visitors stats, in a larger web aplication wich captures also the visitor operation system and version, sections visited and so on.<br />
If you just want to get the browser details using this class, you should have something like this:</p>
<p>getBrowser();<br />
$browserVersion=$browser-&gt;getVersion();<br />
?&gt;</p>
<p>Thanks again for this class.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Schuld</title>
		<link>http://chrisschuld.com/projects/browser-php-detecting-a-users-browser-from-php/#comment-2652</link>
		<dc:creator>Chris Schuld</dc:creator>
		<pubDate>Thu, 26 Aug 2010 16:50:13 +0000</pubDate>
		<guid isPermaLink="false">http://chrisschuld.com/?page_id=111#comment-2652</guid>
		<description>Hi Dev,

Yes, do this...

&lt;pre lang=&quot;php&quot;&gt;
$browser = new Browser();
if( $browser-&gt;getBrowser() == Browser::BROWSER_IPHONE &#124;&#124; $browser-&gt;getBrowser() == Browser::BROWSER_IPAD ) {
	echo &#039;You are on an iPhone or iPad&#039;;
}
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Hi Dev,</p>
<p>Yes, do this&#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$browser</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Browser<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$browser</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getBrowser</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> Browser<span style="color: #339933;">::</span><span style="color: #004000;">BROWSER_IPHONE</span> <span style="color: #339933;">||</span> <span style="color: #000088;">$browser</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getBrowser</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> Browser<span style="color: #339933;">::</span><span style="color: #004000;">BROWSER_IPAD</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'You are on an iPhone or iPad'</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

]]></content:encoded>
	</item>
	<item>
		<title>By: Dev Gadgil</title>
		<link>http://chrisschuld.com/projects/browser-php-detecting-a-users-browser-from-php/#comment-2651</link>
		<dc:creator>Dev Gadgil</dc:creator>
		<pubDate>Thu, 26 Aug 2010 16:39:58 +0000</pubDate>
		<guid isPermaLink="false">http://chrisschuld.com/?page_id=111#comment-2651</guid>
		<description>I want to detect first if the browser isMobile() and then if it is an iPhone or an iPad.

The function isMobile() works good. but if i want to implement the function checkBrowseriPhone() i get an error.

Can you tell me how i have to write the php code.

here is my poor version (absolutely beginner, sorry):

$browser = new Browser();
if( $browser-&gt;isMobile()) {
	echo &#039;you are on a mobile device&#039;;
        if ( $browser-&gt;checkBrowseriPhone()) {
             echo &#039;you are on an iPhone&#039;;
        } else {
             echo &#039;you are on an other mobile device than iPhone&#039;;
        }
} else {
	echo &#039;you are NOT on a mobile device&#039;:
}


I get an error at the statement: if ( $browser-&gt;checkBrowseriPhone())

please give me some advice. thx in advance :-)</description>
		<content:encoded><![CDATA[<p>I want to detect first if the browser isMobile() and then if it is an iPhone or an iPad.</p>
<p>The function isMobile() works good. but if i want to implement the function checkBrowseriPhone() i get an error.</p>
<p>Can you tell me how i have to write the php code.</p>
<p>here is my poor version (absolutely beginner, sorry):</p>
<p>$browser = new Browser();<br />
if( $browser-&gt;isMobile()) {<br />
	echo &#8216;you are on a mobile device&#8217;;<br />
        if ( $browser-&gt;checkBrowseriPhone()) {<br />
             echo &#8216;you are on an iPhone&#8217;;<br />
        } else {<br />
             echo &#8216;you are on an other mobile device than iPhone&#8217;;<br />
        }<br />
} else {<br />
	echo &#8216;you are NOT on a mobile device&#8217;:<br />
}</p>
<p>I get an error at the statement: if ( $browser-&gt;checkBrowseriPhone())</p>
<p>please give me some advice. thx in advance <img src='http://chrisschuld.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew</title>
		<link>http://chrisschuld.com/projects/browser-php-detecting-a-users-browser-from-php/#comment-2627</link>
		<dc:creator>Andrew</dc:creator>
		<pubDate>Tue, 24 Aug 2010 12:02:48 +0000</pubDate>
		<guid isPermaLink="false">http://chrisschuld.com/?page_id=111#comment-2627</guid>
		<description>Thanks alot, it works alot better than a class called PHP Sniff that I was using before (Outdated I think).

Just tested it in I.e. 6, 7, 8, 9 (BETA) and Firefox 3.6.8 + 4(BETA), Chrome (V???) and the detection works correctly for every single one.

Wonderful work and thank you for your continued efforts to keep it compatible. It also intergated into my existing framework with less than 5 line changes to coding. =)</description>
		<content:encoded><![CDATA[<p>Thanks alot, it works alot better than a class called PHP Sniff that I was using before (Outdated I think).</p>
<p>Just tested it in I.e. 6, 7, 8, 9 (BETA) and Firefox 3.6.8 + 4(BETA), Chrome (V???) and the detection works correctly for every single one.</p>
<p>Wonderful work and thank you for your continued efforts to keep it compatible. It also intergated into my existing framework with less than 5 line changes to coding. =)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jan Theofel</title>
		<link>http://chrisschuld.com/projects/browser-php-detecting-a-users-browser-from-php/#comment-2623</link>
		<dc:creator>Jan Theofel</dc:creator>
		<pubDate>Mon, 23 Aug 2010 22:47:15 +0000</pubDate>
		<guid isPermaLink="false">http://chrisschuld.com/?page_id=111#comment-2623</guid>
		<description>Thanks for your great work! I have put this into a extension for the Open-Source-CMS Contao. This makes it easily available for all Contao developers.</description>
		<content:encoded><![CDATA[<p>Thanks for your great work! I have put this into a extension for the Open-Source-CMS Contao. This makes it easily available for all Contao developers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matthijs</title>
		<link>http://chrisschuld.com/projects/browser-php-detecting-a-users-browser-from-php/#comment-2615</link>
		<dc:creator>Matthijs</dc:creator>
		<pubDate>Mon, 23 Aug 2010 10:05:07 +0000</pubDate>
		<guid isPermaLink="false">http://chrisschuld.com/?page_id=111#comment-2615</guid>
		<description>By far the most expansive, best and complete way to detect browser, version and os. And best of all - it&#039;s implemented in my own website in under 2 minutes. Thank you very VERY much for putting this out here!

Regards, Matthijs</description>
		<content:encoded><![CDATA[<p>By far the most expansive, best and complete way to detect browser, version and os. And best of all &#8211; it&#8217;s implemented in my own website in under 2 minutes. Thank you very VERY much for putting this out here!</p>
<p>Regards, Matthijs</p>
]]></content:encoded>
	</item>
</channel>
</rss>
