<?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>Chris Cook .me &#187; redirect</title>
	<atom:link href="http://chriscook.me/tag/redirect/feed/" rel="self" type="application/rss+xml" />
	<link>http://chriscook.me</link>
	<description>Homepage</description>
	<lastBuildDate>Sat, 31 Jul 2010 22:52:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Detecting iPhone visitors with PHP</title>
		<link>http://chriscook.me/web-development/detecting-iphone-visitors-ph/</link>
		<comments>http://chriscook.me/web-development/detecting-iphone-visitors-ph/#comments</comments>
		<pubDate>Tue, 15 Sep 2009 00:53:59 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[http_user_agent]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[iphone redirect]]></category>
		<category><![CDATA[iphone visitor]]></category>
		<category><![CDATA[ipod]]></category>
		<category><![CDATA[ipod touch]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[redirect]]></category>
		<category><![CDATA[visitor detection]]></category>

		<guid isPermaLink="false">http://chriscook.me/?p=87</guid>
		<description><![CDATA[More and more internet traffic is generated by the iPhone and iPod touch. The PHP snippet below shows you how to automatically redirect your users to a page which is optimized for the iPhone Safari browser. if(strstr($_SERVER['HTTP_USER_AGENT'],'iPhone') &#124;&#124; strstr($_SERVER['HTTP_USER_AGENT'],'iPod')) { // Change your URL below header('Location: http://www.domain.com/iphone'); exit(); }]]></description>
			<content:encoded><![CDATA[<p>More and more internet traffic is generated by the <strong>iPhone</strong> and <strong>iPod touch</strong>.</p>
<p>The PHP snippet below shows you how to automatically redirect your users to a page which is optimized for the iPhone Safari browser.</p>
<pre class="php">
<span class="phpKeyword">
if<span class="phpOperator">(</span></span><span class="phpFunction">strstr</span><span class="phpOperator">(</span><span class="phpScriptVar">$_SERVER</span><span class="phpOperator">[</span><span class="phpString">'HTTP_USER_AGENT'</span><span class="phpOperator">]</span>,<span class="phpString">'iPhone'</span><span class="phpOperator">)</span> <span class="phpOperator">|</span><span class="phpOperator">|</span> <span class="phpFunction">strstr</span><span class="phpOperator">(</span><span class="phpScriptVar">$_SERVER</span><span class="phpOperator">[</span><span class="phpString">'HTTP_USER_AGENT'</span><span class="phpOperator">]</span>,<span class="phpString">'iPod'</span><span class="phpOperator">)</span><span class="phpOperator">)</span>
<span class="phpOperator">{</span>
<span class="phpComment">// Change your URL below
</span><span class="phpFunction">header</span><span class="phpOperator">(</span><span class="phpString">'Location<span class="phpOperator">:</span> http<span class="phpOperator">:</span><span class="phpComment">//www<span class="phpOperator">.</span>domain<span class="phpOperator">.</span>com/iphone'</span><span class="phpOperator">)</span><span class="phpText">;</span>
</span><span class="phpFunction">exit</span><span class="phpOperator">(</span><span class="phpOperator">)</span><span class="phpText">;</span>
<span class="phpOperator">}</span>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://chriscook.me/web-development/detecting-iphone-visitors-ph/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
