spacer
Web Development Blog
 Developer Newsletter

Webmaster Blogs
Content & Blogging
Design
Photoshop
General
JavaScript
PHP
PHP Functions
Web
WordPress
Website Promotion

Blog Archives


Developer Tutorials
AJAX
ASP
CGI & Perl
CSS
Flash
HTML
Illustrator
Java
JavaScript
Linux
MySQL
PHP
Photoshop
Python
Wireless
XML
Miscellaneous

Scripts Directory
AJAX Scripts
ASP Scripts
ASP.NET Scripts
CGI & Perl Scripts
Flash Scripts
Java Scripts
JavaScript Scripts
PHP Scripts
Python Scripts
Remotely Hosted Scripts
Tools & Utilities Scripts
XML Scripts

Web Hosting Directory
ASP.NET
Budget
Dedicated Servers
Ecommerce
Linux
Resellers
Shared
Small Business
Windows

Webmaster Blog

5 PEAR gems: free php scripts that will help you code quicker

PEAR, the PHP Extension and Application Repository, contains hundreds of freely available packages that can be reused in your application. Packages usually come with various functionality within one or more classes, and the PEAR coding standards make sure packages follow the same general style for ease of implementation. Best of all; they’re all entirely open source, from MIT to GPL.

However, many of these packages are bloated, slow and full of specialised features that you may never want to use. Sifting through the repository is also a challenge; a basic category system is in place, but it’s hard to tell what you want when you don’t know what’s available. Here are some gems from the PEAR repository that you could really find useful.

1. Services_Akismet: Deal with spam once and for all
When it comes to dealing with comment spam, you can’t go past Akismet. It powers just about every Wordpress blog out there, including this one; it also has an API web service that allow it to be used in any other web application, and Services_Akismet takes advantage of this. Best of all, it’s free for personal or commercial use.

2. HTTP_Request: Perform complex HTTP requests
Sure, there are many web services to hook into and web pages to download, but how do you access them all? Some times you need to go a little beyond basic file_get_contents; make HTTP requests with sessions attached, upload files, do some basic authentication, maybe even work with a proxy. HTTP_Request will help you do all this and more in a matter of a few lines of code.

3. Archive_Tar
When maintaining a big web application, you’ll often find your server filling up with cache files, archives and data dumps. Storing these effectively is very important to maintaining the performance of your server; if you don’t access them frequently, the best way to achieve this is with Archive_Tar. Similar to creating a .tar tarball and compressing it with GZip on your machine, Archive_Tar will allow your web server to compress large files quickly and effectively.

4. Spreadsheet_Excel_Writer
When creating MS Office files programmaticaly, you often have to rely on having a Windows server with the actual Office products installed to generate your files. However, COM isn’t the best approach if performance is a concern, and more often than not you’ll be deploying on a Windows server. If you need to generate Excel files, no matter what platform you’re working with, Spreadsheet_Excel_Writer is your best bet for pure PHP.

5. XML_Parser
XML is becoming more and more prominent in web applications. From configuration files to meta information and even page data. XML_Parser provides a consistent, reliable, effective way to parse XML files, and is reasonably fast as well.

Have a look through these PEAR packages; remember you can easily install them just by running `pear install PACKAGE_NAME` at a command line/terminal. If this isn’t an option, you can still download them and include them as usual (although you may need to slightly rewrite file paths within the PEAR packages, as they include each other).

Tags: , , , ,


Related Posts
» PEAR Text_Diff is now stable!
» Promising Open Source Projects : piwik
» Promising Open Source Projects : Trellis Desk
» Open Source Social Networking Server: Built on LAMP!
» Give Your Visitors a Relative Time
 


Leave a Reply





About the NetVisits, Inc Network | Write For Us | Advertise
Copyright ©2007 NetVisits, Inc Network. All Rights Reserved. Privacy Policy.
Visit other NetVisits, Inc. sites: