The Phoenix Diary

PHP Classes Innovation Award 2009-04

Posted in The Best PHP Classes by John Smith on October 18, 2009

The PHP Programming Innovation Award goal is to provide recognition to developers who make outstanding contributions to the PHP community. The award aims to honor developers who share components in the form of PHP classes of objects that provide innovative features or solve problems with approaches that provide additional value to the PHP applications of other developers.

1. Remove Border From Image, by Pawel Antczak
Sometimes it is necessary to process images in such way that they occupy the least possible size. One way to do that is to remove exceeding border thickness. This class can do that by cropping the image by eliminating the sides of the image that have approximately the same color around the whole image.

Detailed Description:

  • This class can be used to crop images by removing common color borders.
  • It can load a picture and scan its border pixels to determine how thick is the border.
  • The sensibility level that is used to determine which pixels are in the border is configurable.
  • The class can crop the image be keeping on the interior inside the image border.
  • The resulting cropped image can be displayed in JPEG, PNG or GIF format, saved to a file or embedded in an HTML page.

 

2. My Image Filter, by Uku-Kaarel Jo~esaar
PHP always had a powerful set of functions for image creation and manipulation. PHP 5 releases extended PHP image manipulation capabilities by adding more powerful image manipulation functions. This class provide a single interface to the PHP image manipulation capabilities that makes available also under PHP 4 some of the functions that were introduced only in PHP 5 releases.

Detailed Description:

  • This class can be used to apply several types of effects on images.
  • It can open an image file and perform several types of operations to apply filters to the image.
  • Currently it can apply 27 types of filters based on PHP image extension functions.
  • Some filters that depend on image functions only available on PHP 5 can be applied with PHP 4 using alternative implementation with PHP 4 compatible code that is provide as separate scripts with this class.

 

3. PHP Keyword Analyser, by Er. Rochak Chauhan
Sometimes you want to evaluate how well your site is ranking in terms of search engine results for certain keywords. This class can provide a practical solution to evaluate that by performing searches in Google for given keywords and then evaluate in which position the first page of your site appears listed.

Detailed Description:

  • This can be used to find out how a site ranks in Google for a keyword.
  • It can access Google search pages to perform a search for a given keyword.
  • The class check the first 10 pages of results and check whether any pages of a given site appear in the results.
  • It returns the first position the given site appears in the result pages.

 

4. Binary Serialization, by Cesar D. Rodas
PHP provides functions to serialize variable values, so they can be stored or sent over a network as a single string. The unserialize function reverses the process by rebuilding the original variable value from the serialized value. PHP serializes values into text strings. This class provides an alternative serialization method that uses a binary format to represent the serialized values. This way, serialized values take less space to store and less time to transmit over a network.

Detailed Description:

  • This class can be used to serialize and unserialize values in binary format.
  • It can take a scalar value, array or object and generates string of platform independent binary data that represents the value.
  • The class can also do the opposite, i.e. unserialize binary data previously serialized by this class and rebuilds the original value.

 

5. Hex Editor, by De Rosa Luigi
Binary files cannot be edited like text files in regular text editors because characters within certain code ranges are not printable. This class provides a work around for editing binary files. It converts the file contents into lines of hexadecimal text, so it can be easily changed in a text editor. The class can also convert the changed hexadecimal lines back to binary format before storing the updated binary file contents.

Detailed Description:

  • This class can read and write files to edit their data.
  • It can open a file and convert its contents into a corresponding hexadecimal string representation.
  • The class can also rewrite the file with a hexadecimal representation string of the changed contents.

 

6. flv2mp3, by Marko Schulz
Flash video has become a very popular format for presenting videos in Web sites. Sometimes users just want to download the audio tracks of a Flash video stream. This class provides a solution to do that with the help of the Mplayer program.

Detailed Description:

  • This class can be used to extract MP3 audio from Flash video movies.
  • It uses the Mplayer program to extract an MP3 audio file from a given Flash video file.
  • The extracted MP3 audio file is served for download.

 

7. Zend Framework Installer, by Ruben Crespo
Zend Framework is a package that has been growing in popularity among PHP developers. This class helps those that want to get started quickly with Zend Framework by setting a directory and file structure for a typical Zend Framework based application.

Detailed Description:

  • This class can be used to setup a files for Zend framework based application.
  • It creates a common directory structure as recommended in the Zend Framework´s manual.
  • The class can generate also bootstrap file and the index controller with its view.

 

8. Seltz Analyzer, by Seltzlab
There are many solutions for determining the most important keywords of a text document. However, when the text is part of an HTML document, the importance of each keyword may be affected by the emphasis given by the tags that enclose each keyword. This class implements an approach for determining the most important keywords in an HTML document considering also the tags that format them.

Detailed Description:

  • This class can be used to extract important words from HTML documents.
  • It can process a well-formed XHTML document and extract the words contained in the document.
  • The class gives scores to each word depending on conditions like, whether the first letter is upper case, whether the word is inside strong or bold tags, etc..
  • It returns an associative array of words sorted by importance score.

 

9. Generics, by Pulni4kiya
Generics is a feature available in languages like Java that allows checking and manipulating values of data types that may only be known at run-time, like for instance manipulating collections of values. This class provides similar implementation of generic type values manipulation in PHP.

Detailed Description:

  • This package provides an implementation of generic types in PHP.
  • It allows defining the types of values to be returned by generic classes so they can be checked dynamically at run-time.
  • Exceptions are thrown when the defined type does not match the returned values.

 

10. pop3ml, by giuseppe lucarelli
Managing a mailing list consists on several tasks that include receiving and resending messages sent to the mailing list, joining and removing mailing lists subscribers, etc. This class provides a complete solution to do all that in PHP.

Detailed Description:

  • This class can be used to manage or newsletters mailing lists using a POP3 account.
  • It can check a POP3 account for messages with request from users subscribe and unsubscribe from the list. The subscribers list is stored in a MySQL database table.
  • It can also queue messages for delivery to the list subscribers using a remote SMTP server.
  • The class also supports moderated lists and allowing and disallowing specify e-mail address from sending messages to a list.

 

11. DBX Parser, by László Zsidi
Microsoft Outlook is a very popular mail client program. It stores e-mail messages in files with the DBX database format. This class makes it possible to convert Microsoft Outlook e-mail message files into plain text MIME message files format, often known as the EML format.

Detailed Description:

  • This class can be used to converts Microsoft Outlook database files to Internet e-mail format (EML) in pure PHP.
  • It can open and parse Microsoft Outlook 5 and 6 database files.
  • The class can extract the e-mail messages and save them into the Internet e-mail format.

 

12. Anti_Mcrypt, by Christian
Data protection by using encryption may often be broken when the encryption keys are weak. Usually the problem is that either the keys are well known words found in dictionaries, or are simple combination of dictionary words with simple numbers or other words also found in dictionaries. This class provides a simple solution to improve security of encrypted data by appending an hard to guess hash data to the key, so the actual encryption key is never smaller than a given limit length.

Detailed Description:

  • This class can be used to encrypt and decrypt data using mcrypt.
  • It takes a given key to encrypt data and checks if it is within the allowed length range.
  • The key is padded salt string if necessary to make sure that the actual encryption key always has the maximum length.
  • The class uses the key to either encrypt or decrypt data with PHP mcrypt encryption functions.
Advertisement

Comments Off

Follow

Get every new post delivered to your Inbox.