<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Comments on snippet: 'PHP redirect without javascript'</title>
<link>http://snipplr.com</link>
<description>Snipplr comments feed'</description>
<language>en-us</language>
<pubDate>Sun, 26 May 2013 17:53:22 GMT</pubDate>
<item>
<title>benastan said on 1/4/11</title>
<link>http://snipplr.com/view/46190/php-redirect-without-javascript/</link>
<description><![CDATA[ mdetect is a library that detects whether the user if is a smartphone. the functions require() and require_once() load php scripts/libraries.

why not simply use header() ?

require_once("mdetect.php");
header("Location: " . ((uagent_info::DetectSmartphone() )?"http://m.google.com":"http://www.google.com")); ]]></description>
<pubDate>Tue, 04 Jan 2011 20:08:56 GMT</pubDate>
<guid>http://snipplr.com/view/46190/php-redirect-without-javascript/</guid>
</item>
<item>
<title>confuxion said on 12/28/10</title>
<link>http://snipplr.com/view/46190/php-redirect-without-javascript/</link>
<description><![CDATA[ I'm sorry, color me newby in PHP, but I'm confused about the 2nd line in the above code:

require_once("mdetect.php");

What does the "mdetect.php" refer to? Or is it the way by which the above code should be named as a file? Again, sorry for what surely will seem like a stupid question. Thanks in advance for your reply. ]]></description>
<pubDate>Tue, 28 Dec 2010 14:03:48 GMT</pubDate>
<guid>http://snipplr.com/view/46190/php-redirect-without-javascript/</guid>
</item>
</channel>
</rss>