<?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>Sun, 12 Feb 2012 20:19:02 -0600</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[PHPMaster.com: Understanding OAuth - Tweeting from Scratch, Part 2]]></title>
      <guid>http://www.phpdeveloper.org/news/17037</guid>
      <link>http://www.phpdeveloper.org/news/17037</link>
      <description><![CDATA[<p>
On PHPMaster.com today they're posted the <a href="http://phpmaster.com/understanding-oauth-2/">second part of their OAuth series</a> showing you how to use the authentication mechanism to connect to <a href="http://twitter.com">Twitter</a>'s API. (Part one <a href="http://phpdeveloper.org/news/17006">is here</a>.
</p>
<blockquote>
Welcome back to Understanding OAuth - Tweeting from Scratch. This is Part 2 of the two-part series and picks up right where we left off in <a href="http://phpmaster.com/understanding-oauth-1">Part 1</a> with your returned Access Credentials. Since obtaining the credentials is the grueling part of the process, there's not much more left to do except posting a tweet on the user's behalf. Hopefully you'll find the final steps to be a lot easier to follow and more fun to implement.
</blockquote>
<p>
They show you how to store the credentials from Part 1 into your session for safe keeping and  include a simple form you will use to send a tweet to Twitter. They choose to manually build the HTTP POST request, including the credential headers along with the payload (oauth_consumer_key, oauth_signature, oauth_token, etc).
</p>]]></description>
      <pubDate>Tue, 25 Oct 2011 10:09:48 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Shay Ben Moshe's Blog: PDO Persistent Connection Analysis]]></title>
      <guid>http://www.phpdeveloper.org/news/16526</guid>
      <link>http://www.phpdeveloper.org/news/16526</link>
      <description><![CDATA[<p>
<i>Shay Ben Moshe</i> has a new post to his blog today looking at <a href="http://blog.shay.co/pdo-persistent-connection-analysis/">some of the benefits</a> that using the persistent connections offered in <a href="http://php.net/pdo">PDO</a> can have on your application.
</p>
<blockquote>
<a href="http://php.net/manual/en/book.pdo.php">PDO</a> is an abstraction layer for database connections in PHP, and it became increasingly popular in the past few years. PDO gives us the option to use a persistent connection. If we don't use this option, a new connection is created for each request. If we do use this option, the connection is not closed at the end of the script, and it is then re-used by other script requests.
</blockquote>
<p>
He shares the setup for his testing (hardware and MySQL configuration) and some of the results from his tests using the Apache <a href="http://httpd.apache.org/docs/2.0/programs/ab.html">ab tool</a> for making web requests against an application. You'll need to <a href="http://blog.shay.co/files/pdo.rar">download the archived file</a> to see the results, though. It also includes the files he used to test with, comparing regular connections to the persistent ones.
</p>]]></description>
      <pubDate>Tue, 28 Jun 2011 08:11:15 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[9Lessons: Import GMail Contacts Google OAuth Connect with PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/16486</guid>
      <link>http://www.phpdeveloper.org/news/16486</link>
      <description><![CDATA[<p>
In a recent post to the 9Lessons.info site, <i>Srinivas Tamada</i> shows you how to <a href="http://www.9lessons.info/2011/06/import-gmail-contacts-google-oauth.html">connect Gmail with your system to import contacts</a> via the magic of OAuth (pulled from Gmail to you).
</p>
<blockquote>
Inviting friends is the most important part of the web project success. This post explains you how to import Gmail contacts from address book via Google open authorization protocol connect with PHP. It's simple just few configurations follow below four steps, use this script and give option to invite more friends.
</blockquote>
<p>
Following a few simple steps and using <a href="http://demos.9lessons.info/subscribe/index_gmail.php">this simple script</a> - registering the domain under Google Accounts, verify ownership and use the OAuth consumer and secret keys in the script. It's then simple to grab the contacts and output their details as the "Contacts.php" example script shows.
</p>]]></description>
      <pubDate>Fri, 17 Jun 2011 11:11:15 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Eran Galperin's Blog: Breaking Down The PayPal API]]></title>
      <guid>http://www.phpdeveloper.org/news/16241</guid>
      <link>http://www.phpdeveloper.org/news/16241</link>
      <description><![CDATA[<p>
In a recent post <i>Eran Galperin</i> takes a look at the PayPal API and <a href="http://www.techfounder.net/2011/04/23/breaking-down-the-paypal-api/">breaks it down</a> into smaller, easy to digest chunks to show you how to you can implement it in your application. Be warned, though - he mentions that it's the "among the worst API he's ever had to deal with" for several reasons.
</p>
<blockquote>
PayPal is the most popular platform for receiving online payments. The relative ease of opening a PayPal account and receiving payments compared to opening a merchant account for a traditional payment gateway is the number one reason, and another is the comprehensive API they provide for their payment services. [...] There doesn't seem to be any better alternatives currently, so hopefully this guide will help ease the pain for some of you out there taking your lumps working the API into your applications.
</blockquote>
<p>
<i>Eran</i> starts with a look at some of the different payment options, express, direct, recurring and mass, and what they're good for. From there, it's off to the code with his tool of choice being <a ref="http://php.net/curl">curl</a> to make it simpler to make requests with headers, content and fetch the response message. He's put together a little custom function to make it easier to reuse. As an example, he shows how to make an Express Checkout request by grabbing a token and redirecting to the PayPal site for handling.
</p>]]></description>
      <pubDate>Mon, 25 Apr 2011 09:50:54 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Brian Swan's Blog: SQL Server Driver for PHP Connection Options: CharacterSet]]></title>
      <guid>http://www.phpdeveloper.org/news/15972</guid>
      <link>http://www.phpdeveloper.org/news/15972</link>
      <description><![CDATA[<p>
<i>Brian Swan</i> has posted another in his series looking at connection options for the SQL Server driver for PHP. In <a href="http://blogs.msdn.com/b/brian_swan/archive/2011/02/24/sql-server-driver-for-php-connection-options-characterset.aspx">his latest</a> he looks at the "CharacterSet" setting, an easy way to define which encoding the remote database is using.
</p>
<blockquote>
One thing that helped me understand the CharacterSet option was to realize that its name is a bit misleading (although it seems to be inline with other uses of CharacterSet or charset). It is used to specify the encoding of data that is being sent to the server, not the character set. With that in mind, the possible values for the option begin to make sense: SQLSRV_ENC_CHAR, SQLSRV_ENC_BINARY, and UTF-8. 
</blockquote>
<p>
He looks at each of these three options in more detail - SQLSRV_ENC_CHAR being the default, SQLSRV_ENC_BINARY when binary data is needed and UTF-8 when, obviously, you need UTF-8 data transfer between the client and server.
</p>]]></description>
      <pubDate>Mon, 28 Feb 2011 12:15:33 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Chris Jones' Blog: PHP OCI8 and Oracle 11g DRCP Connection Pooling in Pictures]]></title>
      <guid>http://www.phpdeveloper.org/news/15941</guid>
      <link>http://www.phpdeveloper.org/news/15941</link>
      <description><![CDATA[<p>
<i>Chris Jones</i> has posted some "pictures" of the performance that an Oracle database sees when it uses the connection pooling versus the normal connect/allocate sort of connection with the Oracle OCI8 driver for PHP. As <a href="http://blogs.oracle.com/opal/2011/02/php_oci8_and_oracle_11g_drcp_c.html">you can see</a>, the differences in memory consumption are huge.
</p>
<blockquote>
Here is a screen shot from a PHP OCI8 connection pooling demo that I like to run. It graphically shows how little database host memory is needed when using DRCP connection pooling with Oracle Database 11g. Migrating to DRCP can be as simple as starting the pool and changing the connection string in your PHP application.
</blockquote>
<p>
He also describes the differences between the pooled and non-pooled connections (to the developer it's as easy as putting ":pooled" in the connect string) in <a href="http://blogs.oracle.com/opal/assets_c/2011/02/drcp_results-13276.html">his graphs</a>, and notes that using the pooling doesn't just have to be for large site - smaller sites can benefit too.
</p>]]></description>
      <pubDate>Tue, 22 Feb 2011 10:44:46 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Brian Swan's Blog: SQL Server Driver for PHP Connection Options: ReturnDatesAsStrings]]></title>
      <guid>http://www.phpdeveloper.org/news/15876</guid>
      <link>http://www.phpdeveloper.org/news/15876</link>
      <description><![CDATA[<p>
<i>Brian Swan</i> has a new post to his blog today looking at one of the <a href="http://blogs.msdn.com/b/brian_swan/archive/2011/02/08/sql-server-driver-for-php-connection-options-returndatesasstrings.aspx">connection options for the SQL Server driver</a> in PHP - the "ReturnDatesAsStrings" setting that can make handling date and time information simpler for PHP.
</p>
<blockquote>
This is short post to address a frustration I've seen mentioned on Twitter and in forums a lot: By default, the SQL Server Driver for PHP returns <a href="http://msdn.microsoft.com/en-us/library/ms187819.aspx">datetime</a> columns as <a href="http://www.php.net/manual/en/class.datetime.php">PHP DateTime</a> objects, not strings. This can be especially frustrating if you are not aware of the ReturnDatesAsStrings connection option. By simply setting this option to 1 (or true) when you connect to the server, datetime columns will be returned as strings.
</blockquote>
<p>
He includes some sample code showing how to use the setting (as a part of the settings array passed in to sqlsrv_connect) and the resulting array key from the fetched results on his sample table. This just gives you one more option for handling dates in your SQL Server-based application, especially if you don't need the full DateTIme object's functionality.
</p>]]></description>
      <pubDate>Wed, 09 Feb 2011 08:45:28 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Brian Swan's Blog: SQL Server Driver for PHP Connection Options: Connection Pooling]]></title>
      <guid>http://www.phpdeveloper.org/news/15452</guid>
      <link>http://www.phpdeveloper.org/news/15452</link>
      <description><![CDATA[<p>
<i>Brian Swan</i> has <a href="http://blogs.msdn.com/b/brian_swan/archive/2010/11/17/sql-server-driver-for-php-connection-options-connection-pooling.aspx">another post</a> in his series looking at using the SQL Server driver in PHP applications. This part of the series looks specifically at using the connection pooling option to help improve overall performance of the application.
</p>
<blockquote>
One topic that came up yesterday [during <a href="http://jumpincamp.com/">Jump In! Camp</a>] was connection pooling and how much difference using pooled connections makes in app performance, so that's what I'll look at in this post.
</blockquote>
<p>
He starts by defining (from <a href="http://en.wikipedia.org/wiki/Connection_pool">Wikipedia</a>) what connection pooling is and then puts it in the context of SQL Server by talking about the handling of connections returned to the pool. He shows how to enable and disable the feature via a parameter in the connection options and shows how to configure the number of seconds a connection stays active in the pool.
</p>]]></description>
      <pubDate>Thu, 18 Nov 2010 10:17:17 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Gonzalo Ayuso's Blog: Database connection pooling with PHP and gearman]]></title>
      <guid>http://www.phpdeveloper.org/news/15360</guid>
      <link>http://www.phpdeveloper.org/news/15360</link>
      <description><![CDATA[<p>
<i>Gonzalo Ayuso</i> has a new post to his blog today looking at using the <a href="http://gearman.org/">Gearman</a> tool to <a href="http://gonzalo123.wordpress.com/2010/11/01/database-connection-pooling-with-php-and-gearman/">pool database connections</a> for his application and make them available for easy reuse.
</p>
<blockquote>
Handling Database connections with PHP is pretty straightforward. Just open database connection, perform the actions we need, and close it. There's a little problem. We cannot create a pool of database connections. We need to create the connection in every request. Create and destroy, again and again. [...] In this post I'm going to try to explain a personal experiment to create a connection pooling using <a href="http://gearman.org/">gearman</a>.
</blockquote>
<p>
He includes a basic database connection example with PDO, logging into a single database and fetching all of the results. To integrate this into the gearman functionality, he creates a configuration class to hold connection details and the <a href="http://code.google.com/p/php-pool/source/browse/worker/worker.php">worker</a> code (along with some libraries to help manage the connections) that gets the results, serializes them and returns them back to the calling script.
</p>]]></description>
      <pubDate>Mon, 01 Nov 2010 09:07:51 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Andrey Hristov's Blog: Replacing mysqli's Connection, Result and Statement classes]]></title>
      <guid>http://www.phpdeveloper.org/news/14770</guid>
      <link>http://www.phpdeveloper.org/news/14770</link>
      <description><![CDATA[<p>
On his blog today <i>Andrey Hristov</i> has <a href="http://hristov.com/oblog/blog/post/2010/07/08/replacing-mysqlis-connection-result-and-statement-classes/">a quick post</a> that talks about two methods to extend the functionality that the mysqli extension offers in PHP with your own custom code.
</p>
<blockquote>
Have you ever though about extending mysqli's classes. It's pretty simple to subclass the connection class mysqli. However, subclassing mysqli_result and mysqli_stmt is not so obvious, actually I though that it's even not possible. However, never say never! After discussing mysqli's OO interface for an hour yesterday [...] I found out how one can plug his own classes.
</blockquote>
<p>
Two code examples are provided - one for extending the mysqli_result and the other extending the mysql_stmt class. You can find more about these and other classes the mysqli extension has to offer in <a href="http://us3.php.net/manual/en/book.mysqli.php">this section of the PHP manual</a>.
</p>]]></description>
      <pubDate>Fri, 09 Jul 2010 10:31:03 -0500</pubDate>
    </item>
  </channel>
</rss>

