<?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>Fri, 21 Nov 2008 05:56:35 -0600</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Robert Eisele's Blog: Face detection with PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/10677</guid>
      <link>http://www.phpdeveloper.org/news/10677</link>
      <description><![CDATA[<p>
<i>Robert Eisele</i> has <a href="http://www.xarg.org/2008/07/face-detection-with-php/">posted on</a> an interesting topic recently - using a PHP interface to the <a href="http://www.intel.com/technology/computing/opencv/">OpenCV</a> library (from Intel) to detect faces in images.
</p>
<blockquote>
The headline does say facedetection - but what does this mean? Easy said, this article focus on how to find faces on images with PHP. Faces have a certain form and so it is possible to search for it. At the end of the search you will say how many human faces are on the image or better: Where are human faces on my image. This article is not intended to be mathematically.
</blockquote>
<p>
The <a href="http://www.intel.com/technology/computing/opencv/">OpenCV</a> library is a pattern-detection tool that can, based on the "experience" it has trained on with sample files, do its best to find similar structures in any given image. He's come up with a <a href="http://www.xarg.org/download/facedetect.phps">wrapper</a> that handles most of the details for you. You can define the xml file type (frontalface, lowerbody, upperbody, etc) that you want it to try to match to. 
</p>
<p>
He gives some examples of the output from each on one of the sample images included in the training group as well as a random photo grab from flickr that dynamically tries to apply one of the face filters.
</p>]]></description>
      <pubDate>Thu, 24 Jul 2008 12:55:41 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Jonathan Snook's Blog: Multiple Validation Sets in CakePHP 1.2]]></title>
      <guid>http://www.phpdeveloper.org/news/10661</guid>
      <link>http://www.phpdeveloper.org/news/10661</link>
      <description><![CDATA[<p>
<i>Jonathan Snook</i> has <a href="http://snook.ca/archives/cakephp/multiple_validation_sets_cakephp/">posted two methods</a> for creating multiple validation sets in the latest version of your <a href="http://www.cakephp.org">CakePHP</a> application.
</p>
<blockquote>
In CakePHP, you define how your data should be validated by setting parameters on the validate property of your model. In version 1.2, there is an on option that can be set on a specific rule that, when set, is either create or update. [...] Despite that, I developed a slightly different approach that allows for different validation sets to be specified and to be cleanly separated from each other.
</blockquote>
<p>
He overrides the validates() method with his own in a custom model in one of two ways - having the script check for a validation set for the current controller or by specifying it directly with a validationSet property. Code for both methods is included.
</p>]]></description>
      <pubDate>Wed, 23 Jul 2008 07:51:27 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Derick Rethans' Blog: Detecting Timezone By IP]]></title>
      <guid>http://www.phpdeveloper.org/news/10132</guid>
      <link>http://www.phpdeveloper.org/news/10132</link>
      <description><![CDATA[<p>
<i>Derick Rethans</i> has posted <a href="http://derickrethans.nl/detecting_timezone_by_ip.php">a method</a> he's come up with to try to figure out the user's timezone based on the IP address they're using:
</p>
<blockquote>
Through <a href="http://planet-php.org/">Planet PHP</a> I found an article on <a href="http://torrentialwebdev.com/blog/archives/152-Pre-populating-forms-with-the-timezone.html">Pre-populating forms with the timezone</a>. I'd normally add a comment instead, but the comment would almost be larger then the original post, so I am instead writing up an entry myself. The post describes several ways to obtain the user's timezone and use that to pre-fill a form. None of them are working properly though. 
</blockquote>
<p>
In <i>Derick</i>'s <a href="http://derickrethans.nl/detecting_timezone_by_ip.php">method</a> combines a bit of Javascript with some PHP to correctly find the timezone.
</p>]]></description>
      <pubDate>Wed, 07 May 2008 11:15:24 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Richard Heyes' Blog: Browser Detection]]></title>
      <guid>http://www.phpdeveloper.org/news/7141</guid>
      <link>http://www.phpdeveloper.org/news/7141</link>
      <description><![CDATA[<p>
<i>Richard Heyes</i> has <a href="http://www.phpguru.org/?updates=1#109">posted a quick script</a> to help you tailor your site to the browser a viewer is using.
</p>
<blockquote>
If you ever wanted some browser detecion code, here it is. It works along the same lines as the Ultimate Javascript Client Side Detector, however it's server side. It doesn't pollute the global namespace (much), and it's very simple. Just include the code and call the function. Easy.
</blockquote>
<p>
<a href="http://www.phpguru.org/static/browser.html">The code</a> is as simple to use as an include and a call to the GetUserAgent function to get what you need. You can <a href="http://www.phpguru.org/downloads/BrowserDetection/">download the script here</a>.
</p>]]></description>
      <pubDate>Mon, 22 Jan 2007 14:45:38 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[New Earth Online: Detecting Users Online]]></title>
      <guid>http://www.phpdeveloper.org/news/7014</guid>
      <link>http://www.phpdeveloper.org/news/7014</link>
      <description><![CDATA[<p>
From the New Earth Online website, there comes <a href="http://www.newearthonline.co.uk/index.php?page=article&article=203">this new tutorial</a> for showing the current number of people browsing your website.
</p>
<blockquote>
After recently having seen a way of showing the number of people currently visiting your site by recording IP address I thought I'd demonstrate my own way of doing it that also includes the ability to show which users online, and number of users/guests online.
</blockquote>
<p>
They <a href="http://www.newearthonline.co.uk/index.php?page=article&article=203">briefly explain</a> the goal of the script and touch on another <a href="http://www.lesterchan.net/portfolio/programming.php">tool for WordPress</a> that does a similar thing, but this solution would work for any site. The rest of the post is the code for the feature that uses a database table to keep track of users online (via insert/update/deletes).
</p>]]></description>
      <pubDate>Tue, 02 Jan 2007 14:42:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Matthew Weir O'Phinney's Blog: mbstring comes to the rescue]]></title>
      <guid>http://www.phpdeveloper.org/news/5380</guid>
      <link>http://www.phpdeveloper.org/news/5380</link>
      <description><![CDATA[<p>
Character encodings, especially when dealing with XML, in PHP can be a pain to say the least. <i>Matthew Weir O'Phinney</i> <a href="http://weierophinney.net/matthew/archives/111-mbstring-comes-to-the-rescue.html">found this out first-hand</a> when a script he was working with had a mixed character set in one of its strings, giving the XML parser in the SimpleXML functionality problems.
</p>
<quote>
<i>
<p>
I tried a number of solutions, hoping actually to automate it via mbstring INI settings; these schemes all failed. iconv didn't work properly. The only thing that did work was to convert the encoding to latin1 -- but this wreaked havoc with actual UTF-8 characters.
</p>
<p>
Then, through a series of trial-and-error, all-or-nothing shots, I stumbled on a simple solution.
</p>
</i>
</quote>
<p>
The discovery was to detect the encoding of the string itself (not really the content) and convert eveything in it to that encoding. How, you might ask? With the handy mb_detect_encoding and mb_convert_encoding functions. Of course, this functionality has to be compiled into PHP, but it's well worth it if it's exactly what you need.
</p>]]></description>
      <pubDate>Wed, 17 May 2006 05:49:23 -0500</pubDate>
    </item>
  </channel>
</rss>
