Category Archives: PHP

PHP: Hypertext Preprocessor

Implementing short URLs using case-sensitive Routes with Zend Framework

Since short URLs are all the rage these days, I wanted to outfit one of my websites with its own short URL capability. A simple way to accomplish this is to base62 encode a numeric identifier (the database table's primary … Continue reading

Posted in PHP, Zend Framework | Leave a comment

Using Zend_Acl with your model

Zend_Acl is an excellent component that provides Access Control List (ACL) functionality. In most cases the goal is to manage user access to resources. access to to manage all things related to user access. In a nutshell, a role to … Continue reading

Posted in Development, PHP, Zend Framework | Tagged , , , , , | Leave a comment

Proper Twitter Integration with Zend Framework

Twitter is all the rage these days. Every site out there has some kind of "Tweet This" link or "Follow us on Twitter" button. Some sites have even deeper integration and tweet events on your behalf. In most cases, those … Continue reading

Posted in PHP, Social Web, Zend Framework | Tagged | Leave a comment

Logging in users via Zend_Auth without Sessions in PHP / Zend Framework

While sessions come in handy for many things, I like to avoid them for the sake of scalability. PHP itself uses a shared-nothing architecture, with only sessions needing special treatment. Once you've got more than one web server, your options … Continue reading

Posted in Development, PHP, Zend Framework | Tagged , , , , | 2 Comments

Dirty Rows and Audit Trails with Zend_Db_Table

There are various ways to update rows in a database table using the Zend_Db_Table components. You can use use Zend_Db_Table::update(), like so: $table = My_Table(); $table->update(array('age' => 22), 'id = 1'); or retrieve the row, and update it: $table = … Continue reading

Posted in Database, Development, PHP, Zend Framework | Tagged , , , , , , , , , , | 1 Comment