Important: Twitter Updating Authentication Methods

Twitter fail whaleI honestly have no idea when this was announced, but Twitter will start disabling its “Basic Auth” on Aug. 16, 2010 (the system will be completely unavailable by Aug. 31). For Twitter users, this doesn’t really mean anything. However, for Web developers that use various interfaces and plug-ins to share information on Twitter, this is big.

The majority of API libraries and classes that were (and, as of this writing, still are) listed in the official Twitter API documentation will stop working. This change, as far as I can tell, will effect the way tweets are sent and the way tweets are received. Therefore, whether you’re trying to post tweets from an external source, or you’re simply trying to list your latest tweets, if the interface uses the old system of Basic Auth, it’s going to stop working on Aug. 31.

Creating Custom Menus in WordPress 3

Wordpress Custom MenusIn my previous post, I outlined how you can add support for the new custom menus that were enabled in WordPress 3. Tonight, I will briefly review the process of creating and organizing those new menus from within your WordPress administration area.

To start with, make sure you’ve activated the theme into which you added the custom menu support. Once you’ve done that, you will see a “Menus” link in the “Appearance” menu on the left sidebar of your administration area. Click on that link and you will see a fresh new screen with a few options on it.

AES Encryption with PHP and MySQL

Occasionally, you may find the need to encrypt information within a database. One of the standards for encryption is AES (Advanced Encryption Standard). In fact, in a lot of government institutions, AES is the required data encryption method.

At this point, I feel I need to make an important distinction. Encryption is a reversible method of masking data; not to be confused with hashing, which is supposed to be a one-way encoding method (though, many hash methods can be cracked through various types of attacks).

If you do need to encrypt your data, you have a few options when working with PHP and MySQL.

The first option is a pair of built-in MySQL functions. AES_ENCRYPT() and AES_DECRYPT() make it easy to encrypt and decrypt your data directly through a MySQL query. In order to use the AES_ENCRYPT() and AES_DECRYPT() functions, you will need to provide the data (original data should be provided to the encryption function, the encrypted data should be provided to the decryption function) as the first parameter and a 16-bit key as the second parameter. The same key will need to be used for both functions (otherwise, the decryption won’t work properly).

PHP Date and Time Functions

PHP offers a few really nice functions to manipulate dates and times. With the functions built into PHP, you can easily pull individual parts of a date or time and use it or format it just about any way you want.


To start, you should really familiarize yourself with PHP’s strtotime() function. The strtotime() function takes a standard date (and optional time) and converts it into a Unix timestamp. Because the strtotime() function returns boolean false if it doesn’t recognize the input as a valid date/time, you can also use it to check the validity of a date.

Pubwich – Aggregate Your Social Data

Pubwich LogoThe other day, AJ Batac posted on Friendfeed about Pubwich, an “open-source online data aggregation PHP application.” I was intrigued, so I decided to check it out. The application is still very young, with a lot of work to be done, but it’s a great idea.

Initially, I was hoping that Pubwich would actually aggregate data from multiple sources into a single interface (the way Friendfeed does), but I soon learned that it actually just allows you to place information from multiple sources on a single page. Still, though, I think it’s a great idea and shows a lot of promise. In my case, at work, we have five Facebook fan pages, a Twitter account, a Flickr account, a YouTube account and at least two major RSS feeds. Rather than simply providing our users with links to each of those accounts, Pubwich provides me with an easy way to show our newest information to our visitors in one place.

Copying PHP Objects

When working with PHP object-oriented programming, the concept of creating copies of objects you’ve created can be a little confusing. The main thing you need to understand is that PHP objects are passed byref rather than the standard variable behavior of passing elements byval.

In case you have never heard those terms before, byref means “by reference,” which means that you are essentially assigning an additional name to your original variable. ByVal means “by value,” which means that you are actually copying the variable, creating an entirely new instance of it.