<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.1" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: PHP Lightweight device-detection</title>
	<link>http://www.dpinyc.com/literature/resources/code-bank/php-lightweight-device-detection/</link>
	<description>design print integrate NYC is dedicated to the creative entrepreneur.</description>
	<pubDate>Thu, 18 Mar 2010 00:36:16 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.1</generator>

	<item>
		<title>By: Eduardo</title>
		<link>http://www.dpinyc.com/literature/resources/code-bank/php-lightweight-device-detection/#comment-222</link>
		<author>Eduardo</author>
		<pubDate>Thu, 01 Nov 2007 18:16:06 +0000</pubDate>
		<guid>http://www.dpinyc.com/literature/resources/code-bank/php-lightweight-device-detection/#comment-222</guid>
					<description>Check a java version of the php detection code:

http://code.google.com/p/mobiledevicedetector/</description>
		<content:encoded><![CDATA[<p>Check a java version of the php detection code:</p>
<p><a href="http://code.google.com/p/mobiledevicedetector/" rel="nofollow">http://code.google.com/p/mobiledevicedetector/</a></p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Niko</title>
		<link>http://www.dpinyc.com/literature/resources/code-bank/php-lightweight-device-detection/#comment-294</link>
		<author>Niko</author>
		<pubDate>Sat, 02 Feb 2008 14:47:11 +0000</pubDate>
		<guid>http://www.dpinyc.com/literature/resources/code-bank/php-lightweight-device-detection/#comment-294</guid>
					<description>How do I implement a code for HTML website?? Php is easy, just copy paste into index.php. What about HTML?

Please, help!</description>
		<content:encoded><![CDATA[<p>How do I implement a code for HTML website?? Php is easy, just copy paste into index.php. What about HTML?</p>
<p>Please, help!</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: admin</title>
		<link>http://www.dpinyc.com/literature/resources/code-bank/php-lightweight-device-detection/#comment-300</link>
		<author>admin</author>
		<pubDate>Sun, 03 Feb 2008 17:06:18 +0000</pubDate>
		<guid>http://www.dpinyc.com/literature/resources/code-bank/php-lightweight-device-detection/#comment-300</guid>
					<description>Niko, I'm not exactly sure on what you mean. Are you trying to use the above code in your site? If you are, you need php to detect. The code above is a basic switch...

You can place this in a file that's included in all pages at top. If a mobile device is detected then it will redirect to the page you decide to show mobiles. If not, you can allow it to continue normally.

Did I clear that up a little better? Take a look at the test pages. &lt;a href="http://www.dpinyc.com/dev/mobile" rel="nofollow"&gt;Click Here&lt;/a&gt; - you can see how the page changes if you use a mobile browser.</description>
		<content:encoded><![CDATA[<p>Niko, I&#8217;m not exactly sure on what you mean. Are you trying to use the above code in your site? If you are, you need php to detect. The code above is a basic switch&#8230;</p>
<p>You can place this in a file that&#8217;s included in all pages at top. If a mobile device is detected then it will redirect to the page you decide to show mobiles. If not, you can allow it to continue normally.</p>
<p>Did I clear that up a little better? Take a look at the test pages. <a href="http://www.dpinyc.com/dev/mobile" rel="nofollow">Click Here</a> - you can see how the page changes if you use a mobile browser.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Niko</title>
		<link>http://www.dpinyc.com/literature/resources/code-bank/php-lightweight-device-detection/#comment-303</link>
		<author>Niko</author>
		<pubDate>Tue, 05 Feb 2008 12:16:52 +0000</pubDate>
		<guid>http://www.dpinyc.com/literature/resources/code-bank/php-lightweight-device-detection/#comment-303</guid>
					<description>Yes, thank you. Actually, I wonder which code to use for HTML language. Your code above works perfectly on php language. I have a site written in HTML so therefore I would like to know a proper code for HTML. Or it is the same?

Thank's for help in advance!</description>
		<content:encoded><![CDATA[<p>Yes, thank you. Actually, I wonder which code to use for HTML language. Your code above works perfectly on php language. I have a site written in HTML so therefore I would like to know a proper code for HTML. Or it is the same?</p>
<p>Thank&#8217;s for help in advance!</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: admin</title>
		<link>http://www.dpinyc.com/literature/resources/code-bank/php-lightweight-device-detection/#comment-304</link>
		<author>admin</author>
		<pubDate>Tue, 05 Feb 2008 16:51:48 +0000</pubDate>
		<guid>http://www.dpinyc.com/literature/resources/code-bank/php-lightweight-device-detection/#comment-304</guid>
					<description>Well actually this code is for php pages only. The basic schematics look like this:

- index.php page with php code redirects to any page (php or html) -&gt;

[php code] ---&#124;
              &#124;--- mobile (this could be html)
              &#124;
              &#124;--- not mobile (this could be html)</description>
		<content:encoded><![CDATA[<p>Well actually this code is for php pages only. The basic schematics look like this:</p>
<p>- index.php page with php code redirects to any page (php or html) -></p>
<p>[php code] &#8212;|<br />
              |&#8212; mobile (this could be html)<br />
              |<br />
              |&#8212; not mobile (this could be html)</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Niko</title>
		<link>http://www.dpinyc.com/literature/resources/code-bank/php-lightweight-device-detection/#comment-305</link>
		<author>Niko</author>
		<pubDate>Tue, 05 Feb 2008 17:35:46 +0000</pubDate>
		<guid>http://www.dpinyc.com/literature/resources/code-bank/php-lightweight-device-detection/#comment-305</guid>
					<description>Maybe do you know where could I get a code for HTML? For example, I have HTML site and I would like to install detection code in it in order to detect a device.

I have tested your code for php and it works perfectly! But I can't implement this into html. So I'm a little worried because it seems that no one can help me.</description>
		<content:encoded><![CDATA[<p>Maybe do you know where could I get a code for HTML? For example, I have HTML site and I would like to install detection code in it in order to detect a device.</p>
<p>I have tested your code for php and it works perfectly! But I can&#8217;t implement this into html. So I&#8217;m a little worried because it seems that no one can help me.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: admin</title>
		<link>http://www.dpinyc.com/literature/resources/code-bank/php-lightweight-device-detection/#comment-306</link>
		<author>admin</author>
		<pubDate>Tue, 05 Feb 2008 17:51:35 +0000</pubDate>
		<guid>http://www.dpinyc.com/literature/resources/code-bank/php-lightweight-device-detection/#comment-306</guid>
					<description>There's no way to do that conditional redirection with HTML. JavaScript might help you with redirecting based on user agent. This might be tricky because some mobile devices don't handle JavaScript properly.

However, if you have access to PHP on your server, I recommend that you use this since the "work" is done on the server and doesn't rely on the browser or operation system (example: WinCE or Blackberry)</description>
		<content:encoded><![CDATA[<p>There&#8217;s no way to do that conditional redirection with HTML. JavaScript might help you with redirecting based on user agent. This might be tricky because some mobile devices don&#8217;t handle JavaScript properly.</p>
<p>However, if you have access to PHP on your server, I recommend that you use this since the &#8220;work&#8221; is done on the server and doesn&#8217;t rely on the browser or operation system (example: WinCE or Blackberry)</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Shibu</title>
		<link>http://www.dpinyc.com/literature/resources/code-bank/php-lightweight-device-detection/#comment-354</link>
		<author>Shibu</author>
		<pubDate>Sat, 22 Mar 2008 15:52:04 +0000</pubDate>
		<guid>http://www.dpinyc.com/literature/resources/code-bank/php-lightweight-device-detection/#comment-354</guid>
					<description>Thanks for the great explanation. I am new to PHP. I do use formmail.php to process a form from a web page, but I am having trouble with the above codes. 

First, I am unsure of how the code should look. Basically I want the code to reside in my index.html file if possible &#38; just redirect any mobile browsers to http://mywebsite/m. If it is not mobile, I would like the code to just continue on &#38; display the page as normal.
Would the following lines be correct:

  52. // example 1 - detect and redirect mobile browsers  
  53.   
  54. if(detect_mobile_device()){  
  55.   
  56.   header('Location: http://nyfootexpert.com/m/index.html/');  
  57.   
  58.   exit;  
  59.   
  60. }  
  61.
  73.   
  74. ?&#62;</description>
		<content:encoded><![CDATA[<p>Thanks for the great explanation. I am new to PHP. I do use formmail.php to process a form from a web page, but I am having trouble with the above codes. </p>
<p>First, I am unsure of how the code should look. Basically I want the code to reside in my index.html file if possible &amp; just redirect any mobile browsers to <a href="http://mywebsite/m." rel="nofollow">http://mywebsite/m.</a> If it is not mobile, I would like the code to just continue on &amp; display the page as normal.<br />
Would the following lines be correct:</p>
<p>  52. // example 1 - detect and redirect mobile browsers<br />
  53.<br />
  54. if(detect_mobile_device()){<br />
  55.<br />
  56.   header(&#8217;Location: <a href="http://nyfootexpert.com/m/index.html/" rel="nofollow">http://nyfootexpert.com/m/index.html/</a>&#8216;);<br />
  57.<br />
  58.   exit;<br />
  59.<br />
  60. }<br />
  61.<br />
  73.<br />
  74. ?&gt;</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: S Parrott</title>
		<link>http://www.dpinyc.com/literature/resources/code-bank/php-lightweight-device-detection/#comment-404</link>
		<author>S Parrott</author>
		<pubDate>Sat, 12 Apr 2008 23:22:58 +0000</pubDate>
		<guid>http://www.dpinyc.com/literature/resources/code-bank/php-lightweight-device-detection/#comment-404</guid>
					<description>I tested the script and it works great, thank you.  And a BIG thank you for making it so clear to us Graphic Designer who dabble in the web because out clients require us to! :)

Question:  Is it possible to have a script that detects the mobile device and then sends the visitor to a page that fits the mobile device size?  I notice that on different devices, the page is not always clean and clear.  Some are narrower, etc. 

Is this a good idea or am I making it more difficult than I need to?

Thank you,

S Parrott
OneWay Advertising</description>
		<content:encoded><![CDATA[<p>I tested the script and it works great, thank you.  And a BIG thank you for making it so clear to us Graphic Designer who dabble in the web because out clients require us to! :)</p>
<p>Question:  Is it possible to have a script that detects the mobile device and then sends the visitor to a page that fits the mobile device size?  I notice that on different devices, the page is not always clean and clear.  Some are narrower, etc. </p>
<p>Is this a good idea or am I making it more difficult than I need to?</p>
<p>Thank you,</p>
<p>S Parrott<br />
OneWay Advertising</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Rohan</title>
		<link>http://www.dpinyc.com/literature/resources/code-bank/php-lightweight-device-detection/#comment-412</link>
		<author>Rohan</author>
		<pubDate>Mon, 14 Apr 2008 13:23:25 +0000</pubDate>
		<guid>http://www.dpinyc.com/literature/resources/code-bank/php-lightweight-device-detection/#comment-412</guid>
					<description>These scripts work great for detecting between desktop and mobile (.mobi), but is there a way to detect whether a user's mobile is only able to display .wml? I unfortunately have to cater for the older phones in my application as well.</description>
		<content:encoded><![CDATA[<p>These scripts work great for detecting between desktop and mobile (.mobi), but is there a way to detect whether a user&#8217;s mobile is only able to display .wml? I unfortunately have to cater for the older phones in my application as well.</p>
]]></content:encoded>
				</item>
</channel>
</rss>
