<?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>Wed, 19 Jun 2013 16:22:16 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[PHPMaster.com: Extract Objects from an Access Database with PHP, Part 2]]></title>
      <guid>http://www.phpdeveloper.org/news/19661</guid>
      <link>http://www.phpdeveloper.org/news/19661</link>
      <description><![CDATA[<p>
PHPMaster.com has posted the <a href="http://phpmaster.com/extract-ole-objects-from-an-access-database-using-php-2/">second part</a> of their series covering connecting PHP to a legacy Access database. In <a href="http://phpmaster.com/extract-ole-objects-from-an-access-database-using-php-1/">part one</a> they introduced you to working with the data and how to extract the object. In this new part they look at specific file types and how to pull out their data.
</p>
<blockquote>
 In this second part we'll learn how to extract Acrobat PDF documents and take a brief look at a selection of image formats. The only similarity that PDF, GIF, PNG, etc., have when stored in an Access database is that they are all wrapped in an OLE container consisting of a variable length header and trailer. As we shall see, the trailer can be ignored as it was with the package discussed in Part 1. The header is more useful, but doesn't contain all the information we need.
</blockquote>
<p>
They get into the details of the headers for each type of object and include screenshots of what they look like in a hex viewer. The code for the complete class is included in the post, making it easy to drop in and get started with your transition from database object to external file. 
</p>
Link: http://phpmaster.com/extract-ole-objects-from-an-access-database-using-php-2]]></description>
      <pubDate>Mon, 03 Jun 2013 10:37:24 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: Creating a PHP OAuth Server]]></title>
      <guid>http://www.phpdeveloper.org/news/18976</guid>
      <link>http://www.phpdeveloper.org/news/18976</link>
      <description><![CDATA[<p>
On PHPMaster.com today there's <a href="http://phpmaster.com/creating-a-php-oauth-server/">a new tutorial posted</a> about creating your own OAuth server in PHP using the <a href="http://code.google.com/p/oauth-php/">oauth-php package</a> to do the "heavy lifting".
</p>
<blockquote>
If you've ever integrated with another API that requires security (such as Twitter), you've probably consumed an OAuth service. In this article, I'll explore what it takes to create your own three-legged OAuth server allowing you, for example, to create your own secure API which you can release publicly.
</blockquote>
<p>
They include a <a href="http://cdn.phpmaster.com/files/2012/12/diagram.png">visual representation</a> of the OAuth authentication flow (it's not the simplest thing) and the database structure/sample code you'll need to get the server up and listening. Also included is a registration form and how to generate a request token and give back an access token. There's also some sample code showing how to validate the request and it's access token to check for a correct (and allowed) request.
</p>]]></description>
      <pubDate>Tue, 01 Jan 2013 11:56:46 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPClasses.org: The Secret PHP Optimization of version 5.4]]></title>
      <guid>http://www.phpdeveloper.org/news/18094</guid>
      <link>http://www.phpdeveloper.org/news/18094</link>
      <description><![CDATA[<p>
In <a href="http://www.phpclasses.org/blog/post/187-The-Secret-PHP-Optimization-of-version-54.html">this new post</a> from <i>Manuel Lemos</i> on the PHPClasses.org blog about some of the performance enhancements that were introduced in the latest PHP releases (the 5.4.x series) including variable access optimization.
</p>
<blockquote>
PHP 5.4 introduced several performance optimizations. One of them was not discussed much in the PHP community but it may affect the performance of your code depending on the way you write it.
</blockquote>
<p>
He gets into some of the details surrounding the variable access optimization, pointing out how to get the most out of this improvement. He also does a bit of speculation about future versions of the language, including the possible introduction of <a href="http://www.phpclasses.org/blog/post/117-PHP-compiler-performance.html">"Just In Time" compilers</a>.
</p>]]></description>
      <pubDate>Thu, 14 Jun 2012 12:12:42 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Developer.com: Creating a Custom ACL in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/17946</guid>
      <link>http://www.phpdeveloper.org/news/17946</link>
      <description><![CDATA[<p>
On Developer.com there's a recent tutorial showing you how to <a href="http://www.developer.com/lang/php/creating-a-custom-acl-in-php.html">create a basic access control list</a> in PHP (not in any specific framework). It allows you to define not only user permissions but groups and group permissions as well.
</p>
<blockquote>
So, what are the advantages of an ACL model? The first advantage is security. Using this model will make your application more secure and less vulnerable to exploits. When securing any program, it is good to give to the user only the privileges he/she needs. That means that, for example, you should not give super administrator privileges to someone who will only manage website content. The ACL security model allows you to do just that. The second advantage is the easiness of user management. You can divide users into groups, while each group has certain access permissions. Also, you can easily add new user groups, delete the old ones or change group permissions.
</blockquote>
<p>
They include the database structure you'll need to make the backend work (four tables) and the code to create an "Acl" class with methods to check a user+group for a permission, get the permissions for a user and get the permissions for a group. It's a pretty simple system and has a lot more that could be added to it to make it more robust, but it's a good start.
</p>]]></description>
      <pubDate>Fri, 11 May 2012 10:53:23 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: Using an Access Database with PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/17927</guid>
      <link>http://www.phpdeveloper.org/news/17927</link>
      <description><![CDATA[<p>
On the PHPMaster.com site there's a new tutorial (from <i>David Francis</i>) about <a href="http://phpmaster.com/using-an-access-database-with-php/">connecting to a database</a> (a basic introduction using <a href="http://php.net/pdo">PDO</a>) and doing some of the common operations with the connection.
</p>
<blockquote>
Wouldn't it have been better for them to able to maintain their database where ever they were? Of course, but how? Simple - put it online.  [...] In this article I'll focus on the essential elements of PHP you'll need to use an existing Access database online. One other item that's standard with a Windows installation is the availability of ODBC drivers. These are essential for the use of Access from PHP.
</blockquote>
<p>
He includes a sample database structure (with "product", "product_category" and "category" tables)  and includes some sample code showing how to connect to the remote database and perform some basic actions - select, update, insert and delete
</p>]]></description>
      <pubDate>Tue, 08 May 2012 14:57:38 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: Role Based Access Control in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/17668</guid>
      <link>http://www.phpdeveloper.org/news/17668</link>
      <description><![CDATA[<p>
On PHPMaster.com today there's a new tutorial posted (from <i>Martin Psinas</i>) about using <a href="http://phpmaster.com/role-based-access-control-in-php/">role-based access controls</a> in PHP-based applications. His method isn't based in any specific framework, so it's easily portable to just about any app out there.
</p>
<blockquote>
In this article I will discuss my personal favorite approach: role based access control (RBAC). RBAC is a model in which roles are created for various job functions, and permissions to perform certain operations are then tied to roles. A user can be assigned one or multiple roles which restricts their system access to the permissions for which they have been authorized.
</blockquote>
<p>
He starts with a warning that, if not properly maintained, a role-based system like this can get to be somewhat chaotic so a rules should be in place around the adding and removing of permissions at certain times. His functionality is based on a few database tables - roles, permissions and cross-reference tables between users/roles & permissions/roles. All of the code you'll need to implement the system is included in a Role class, the PrivilegedUser class and the methods you'll need to add/remove/check the logged in user's permissions.
</p>]]></description>
      <pubDate>Tue, 13 Mar 2012 13:10:05 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Refulz.com: CakePHP AclComponent - ACOs, AROs and Mapping]]></title>
      <guid>http://www.phpdeveloper.org/news/17605</guid>
      <link>http://www.phpdeveloper.org/news/17605</link>
      <description><![CDATA[<p>
On the Refulz blog they've posted <a href="http://php.refulz.com/cakephp-aclcomponent-acos-aros-and-mapping/">the next in their series</a> about access control in CakePHP applications. In this new article they look at Access Request Objects (AROs) and Access Control Objects (ACOs) and how they can be managed via the built-in ACL functionality.
</p>
<blockquote>
Continuing with Access Control Lists, we will read about the two Access Control Lists and their mapping. The Access Request Objects (AROs) are a list of the things that seek permissions and the Access Control Objects (ACOs) are the resources on which permissions are required. Both the lists are maintained in the tow tables, namely aros and acos respectively.
</blockquote>
<p>
Included in the post is the SQL you'll need to create the tables for the system to use as well as some basic code to use the AclComponent with the ACOs/AROs. They also show how to use the parentNode method to create parent/child relationships between the objects.
</p>]]></description>
      <pubDate>Wed, 29 Feb 2012 11:38:12 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Lorna Mitchell' Blog: PHP OAuth Provider: Access Tokens]]></title>
      <guid>http://www.phpdeveloper.org/news/16788</guid>
      <link>http://www.phpdeveloper.org/news/16788</link>
      <description><![CDATA[<p>
<i>Lorna Mitchell</i> has posted the latest in her look at OAuth in PHP to her blog today, an <a href="http://www.lornajane.net/posts/2011/php-oauth-provider-access-tokens">introduction to access tokens</a> - generating and handling them in your application.
</p>
<blockquote>
I've been working with <a href="http://oauth.net/">OAuth</a>, as a provider and consumer, and there isn't a lot of documentation around it for PHP at the moment so I thought I'd share my experience in this series of articles. [...] This entry follows on from the ones about the <a href="http://www.lornajane.net/posts/2011/PHP-OAuth-Provider-Initial-Requirements">initial requirements</a>, <a href="http://www.lornajane.net/posts/2011/PHP-OAuth-Provider-Request-Tokens">how to how to handle request tokens</a>, and <a href="http://www.lornajane.net/posts/2011/php-oauth-provider-authenticate-user">authenticating users</a>.
</blockquote>
<p>
In this latest post, she talks about the three different types of tokens - consumer, request and verififier - and how to use them to locate a user in your app's users. Her code validates the request token and verifier against the database and, if successful, inserts the rest of the token information for the user.
</p>]]></description>
      <pubDate>Tue, 30 Aug 2011 08:28:04 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Matthew Weier O'Phinney's Blog: Proxies in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/16555</guid>
      <link>http://www.phpdeveloper.org/news/16555</link>
      <description><![CDATA[<p>
In a new blog post <i>Matthew Weier O'Phinney</i> has <a href="http://weierophinney.net/matthew/archives/263-Proxies-in-PHP.html">taken a look at proxy objects</a> (the Proxy design pattern) and how it differs from some of the other popular patterns.
</p>
<blockquote>
Of the other patterns mentioned, the one closest to the Proxy is the Decorator. In the case of a Decorator, the focus is on adding functionality to an existing object -- for instance, adding methods, processing input before delegating to the target object, or filtering the return of a method from a target object.
</blockquote>
<p>
Proxies stand in for objects and have several benefits for your application that may or may not need all of the overhead a full object could cause. <i>Matthew</i> focuses on one benefit in particular - consuming and controlling access to another object. He sets up a problem of wanting to use properties/methods on objects that aren't exposed directly (like a protected method). His solution is a proxy layer class on top of the original object. He includes a few "gotchas" to look out for when using this technique including overwriting all necessary methods and copying over all of the needed properties.
</p>]]></description>
      <pubDate>Wed, 06 Jul 2011 08:10:08 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPBuilder.com: Use PDO to Access Just About Any Database from PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/16240</guid>
      <link>http://www.phpdeveloper.org/news/16240</link>
      <description><![CDATA[<p>
New on PHPBuilder.com there's a tutorial from <i>Leidago Noabeb</i> about using the PDO functionality that comes installed on many PHP platforms out there to <a href="http://www.phpbuilder.com/columns/pdo-php-data-objects/Leidago_Noabeb04212011.php3">access just about any database</a> you might need to work work. This includes technology like MySQL, DB2, SQLite and PostgreSQL.
</p>
<blockquote>
PHP Data Objects, or "PDO" as it is commonly known, is a lightweight database abstraction layer that is arguably the best, at least in terms of speed. A great deal of this speed is owing to the fact that the PDO extension was compiled with C/C++. The extension became available in PHP5, and as with any other database abstraction layer, its aim is to provide a uniform interface to access a variety of databases. This is also a way for developers to create portable code for a variety of platforms.
</blockquote>
<p>
The tutorial shows you how to find the enabled PDO connection types for your installation (and where to go if you have access to turn more on or off). They show an example connection - in this case, to a MySQL database - and how to run a query or two using this new resource.
</p>]]></description>
      <pubDate>Mon, 25 Apr 2011 08:17:51 -0500</pubDate>
    </item>
  </channel>
</rss>
