<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Sat, 25 May 2013 12:41:50 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[David Walsh's Blog: iPad Detection Using JavaScript or PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/14341</guid>
      <link>http://www.phpdeveloper.org/news/14341</link>
      <description><![CDATA[<p>
<i>David Walsh</i> has a new post to his blog today with some code snippets that can help you <a href="http://davidwalsh.name/detect-ipad">detect iPad users</a> when they come to your site.
</p>
<blockquote>
The hottest device out there right now seems to be the iPad. iPad this, iPad that, iPod your mom. I'm underwhelmed with the device but that doesn't mean I shouldn't try to account for such devices on the websites I create. 
</blockquote>
<p>
He includes three ways to get the job done by matching against the User Agent sent by the browser - Javascript, PHP and with an .htaccess file for an Apache server. As one commenter points out, though, you need to be sure if you already have a redirect on the word "mobile", the iPad's User Agent contains that too.
</p>]]></description>
      <pubDate>Tue, 13 Apr 2010 12:22:22 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Jonathan Street's Blog: When scraping content from the web don't make it obvious]]></title>
      <guid>http://www.phpdeveloper.org/news/8992</guid>
      <link>http://www.phpdeveloper.org/news/8992</link>
      <description><![CDATA[<p>
<i>Jonathan Street</i> <a href="http://torrentialwebdev.com/blog/archives/125-When-scraping-content-from-the-web-dont-make-it-obvious.html">has a tip</a> for those developers out there that have no other choice than scraping content from a remote site - don't make it obvious. He also includes a suggestion on how to make it a little less obvious.
</p>
<blockquote>
A couple of hours ago I was playing around scraping some content from a website. All was going well until suddenly I couldn't get my script to fetch meaningful content. [...] The first thing I did was stop visiting the site for 15 minutes or so and then increase the time between requests. It briefly worked again but quickly stopped.
</blockquote>
<p>
One simple change to his user agent string in his php.ini made the problem evaporate pointing to a user agent filtering happening on the remote side. His helpful hint involves two methods - one in just PHP and the other in cURL - to change the user agent that your scripts are sending. An even better sort of solution might be some sort of rotating array that would alternate between four or five strings to make things even more random.
</p>]]></description>
      <pubDate>Wed, 07 Nov 2007 11:26:00 -0600</pubDate>
    </item>
  </channel>
</rss>
