<?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>Thu, 20 Nov 2008 08:29:24 -0600</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[PHPro.org: SQLite-ON DUPLICATE KEY UPDATE]]></title>
      <guid>http://www.phpdeveloper.org/news/11379</guid>
      <link>http://www.phpdeveloper.org/news/11379</link>
      <description><![CDATA[<p>
<a href="http://www.phpro.org/tutorials/SQLite-ON-DUPLICATE-KEY-UPDATE.html">This new tutorial</a> on the PHPro.org website shows how to implement a common database feature, ON DUPLICATE KEY UPDATE, in a SQLite database with PHP.
</p>
<blockquote>
SQLite is an ultra lite database replacement that comes bundled with PHP. Because of its light weight it lacks many of the features found in more robust applications such as MySQL, PostgresQL and others. One of the features that is lacking is the ON DUPLICATE KEY UPDATE that is often used to automatically UPDATE a record, should a duplicate field be found. Here a demonstration is provided to duplicate this behaviour using PHP Exceptions. 
</blockquote>
<p>
Their example creates a table of animals and inserts several to act as a base. They show insert method, how to get the information back out and what happens when you try add a duplicate value to the table. Normally this just results in an exception being displayed but, when caught with exception handling, it can be redirected into an update statement to change that animal's current information.
</p>]]></description>
      <pubDate>Mon, 10 Nov 2008 12:58:18 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Gaylord Aulke's Blog: Dumping MemcacheD Content (Keys) with PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/10946</guid>
      <link>http://www.phpdeveloper.org/news/10946</link>
      <description><![CDATA[<p>
In a <a href="http://100days.de/serendipity/archives/55-Dumping-MemcacheD-Content-Keys-with-PHP.html">recent blog post</a> <i>Gaylord Aulke</i> illustrated a method for dumping the (key) content from a memcached cache in a friendly, formatted way.
</p>
<blockquote>
When i did some optimization of a cluster based webapp lately, I was wondering how Memcache was speading my cache entries over the cluster. So i did some research for monitoring tools. [...] Inspired by [memcache.php], i wrote a small script that fetches all data from a memcache cluster, gets all keys out of it and then sorts and displays them in a list. Yes it it ugly and yes: the memcacheD is not answering other requests while doing a cachedump.
</blockquote>
<p>
He includes the <a href="http://100days.de/serendipity/archives/55-Dumping-MemcacheD-Content-Keys-with-PHP.html">22 line script</a> in the post to spit back the data in a simple array. From there it can be styled whoever you'd like.
</p>]]></description>
      <pubDate>Tue, 02 Sep 2008 12:58:59 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Zend Developer Zone: Using GnuPG with PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/10758</guid>
      <link>http://www.phpdeveloper.org/news/10758</link>
      <description><![CDATA[<p>
The Zend Developer Zone has a <a href="http://devzone.zend.com/article/3753-Using-GnuPG-with-PHP">new tutorial</a> posted today showing how to use the open source encryption tool GnuPG from inside PHP.
<p>
<blockquote>
While GnuPG works very well as a standalone tool, it also plays very well with PHP. This integration is possible due to PHP's ext/gnupg extension, which provides a flexible and powerful API to access GnuPG functions for encryption, decryption, message signing and verification, and key maintenance. And your mission (should you choose to accept it) will be to accompany me over the next few pages, while I give you a crash course in this API, showing you how easy it is to integrate these functions into your next PHP application.
</blockquote>
<p>
The <a href="http://devzone.zend.com/article/3753-Using-GnuPG-with-PHP">tutorial</a> walks you through some of the basic concepts behind the "lock and key" GnuPG implements and how to get the extension installed so you can follow along. His examples range from a basic encryption of a string out to a full encrypt/decrypt example, how to sign information with a key and even a method for sending an encrypted message.
</p>]]></description>
      <pubDate>Mon, 04 Aug 2008 14:32:56 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Brian Moon's Blog: in_array is quite slow]]></title>
      <guid>http://www.phpdeveloper.org/news/10357</guid>
      <link>http://www.phpdeveloper.org/news/10357</link>
      <description><![CDATA[<p>
<i>Brian Moon</i> had <a href="http://brian.moonspot.net/2008/06/05/in_array-is-quite-slow/">a problem</a> - one of his cron jobs was lasting for much longer (hours!) than it should have been. He tweaked, tested and debugged the script and finally came down to a call to <a href="http://www.php.net/in_array">in_array</a>, something he comments on as being "quite slow".
</p>
<blockquote>
See, this job is importing data from a huge XML file into MySQL.  After it is done, we want to compare the data we just added/updated to the data in the table so we can deactivate any data we did not update. [...] We then compared the two arrays by looping one array and using in_array() to check if the value was in the second array. [...] So, that was running for hours with about 400k items.  Our data did not contain the value as the key, but it could as the value was unique.  
</blockquote>
<p>
He method, replacing the in_array call that had to do a full array scan for each time through the loop with an isset/unset combo on the unique key, changed the execution time down from about 4 hours to 0.8 seconds.
</p>]]></description>
      <pubDate>Fri, 06 Jun 2008 09:36:47 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Web Development Blog: First steps within the Zend Framework]]></title>
      <guid>http://www.phpdeveloper.org/news/9091</guid>
      <link>http://www.phpdeveloper.org/news/9091</link>
      <description><![CDATA[<p>
On the Web Development Blog, there's a <a href="http://www.web-development-blog.com/archives/first-steps-within-the-zend-framework/">quick tutorial</a> they've created for replacing a Google search with a Yahoo one with the help of the Zend Framework and it's Service_Yahoo_Websearch component.
</p>
<blockquote>
During the <a href="http://www.web-development-blog.com/archives/prepared-for-the-php-conference-2007-in-amsterdam/">Zend PHP conference</a> earlier this year, I got in touch with the Zend framework and learned that there is already a class to obtain results from the Yahoo search engine. The class has features to search the Yahoo API for web sites, image, news and the local search results.
</blockquote>
<p>
They walk through the installation of the library (not the framework, though - you'll need that already set up), grabbing the API key from Yahoo and different applications of performing the search.
</p>]]></description>
      <pubDate>Wed, 21 Nov 2007 12:57:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[JSLabs Blog:  How to use the facebook API]]></title>
      <guid>http://www.phpdeveloper.org/news/6432</guid>
      <link>http://www.phpdeveloper.org/news/6432</link>
      <description><![CDATA[<p>
On the JSLabs blog today, there's <a href="http://www.whenpenguinsattack.com/2006/10/05/how-to-use-the-facebook-api/">a new tutorial</a> showing how you (yes you) can use the <a href="http://developers.facebook.com">Facebook Developer's API</a> to pull information from their systems.
</p>
<blockquote>
The facebook API allows you to access profiles, friends, photos, and events.  To access the API from an outside server, you need to go through the following steps:
<ul>
<li>login to your Facebook Account
<li>get an <a href="http://developers.facebook.com/account.php?action=add_key">account key</a>
<li>Get the <a href="http://developers.facebook.com/documentation.php?doc=clients">client library</a>
<li>The php 5 library can be found <a href="http://developers.facebook.com/clientlibs/php5_client.tar.gz">here</a>
</ul>
</blockquote>
<p>
He uses the PHP library to <a href="http://www.whenpenguinsattack.com/2006/10/05/how-to-use-the-facebook-api/">make the connection</a> - a simple call to the API (complete with API key, the location of the interface, a secret key, and a session key to provide a unique identifier. The request made logs a user in (much have a valid Facebook account) and grabs: the count of the messages waiting, the number of posts to your wall, and a list of available photo albums.
</p>]]></description>
      <pubDate>Thu, 05 Oct 2006 13:51:38 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[SitePoint Site Marketing Blog: Track Your Rank Using the Google API]]></title>
      <guid>http://www.phpdeveloper.org/news/5160</guid>
      <link>http://www.phpdeveloper.org/news/5160</link>
      <description><![CDATA[<p>
Sitepoint, widely known for quality in content and tutorials, has a <a href="http://www.sitepoint.com/article/track-rank-google-api">new post</a> on its Site Marketing blog today dealing with tracking a site's Google ranking with the help of the Google API and the <a href="http://pear.php.net/package/SOAP">PEAR SOAP package</a>.
</p>
<p>
<i>Bernard Peh</i>, the author, sets up what the Google API is and includes the way to grab your own API key (your pass into the powerful Google backend). The other two requirements for the project are the PEAR SOAP package and an install of at least PHP 4 or higher.
</p>
<p>
There's a list of input parameters for the functionality, with each described for what it does, and pley of code to help you integrate them into the API call. They give the example of the class grabbing the needed info (via SOAP), parsing out your URL from those results, and a simple form to make checking different URLs all the simpler.
</p>]]></description>
      <pubDate>Wed, 12 Apr 2006 07:24:27 -0500</pubDate>
    </item>
  </channel>
</rss>
