• Home

Logo

Navigation
  • Home
  • Articles
    • Content Writing
    • Design
    • General
    • Internet Marketing
    • Social Media
    • Tools and Tips
    • Usability
    • Web Hosting Articles
  • Tutorials
    • AJAX Tutorials
    • ASP Tutorials
    • C# Tutorials
    • CGI and Perl Tutorials
    • CSS Tutorials
    • Flash Tutorials
    • HTML Tutorials
    • Illustrator Tutorials
    • Java Tutorials
    • JavaScript Tutorials
    • Linux Tutorials
    • Miscellaneous Tutorials
    • MySQL Tutorials
    • Photoshop Tutorials
    • PHP Tutorials
    • Python Tutorials
    • Wireless Tutorials
    • WordPress Tutorials
    • XML Tutorials
  • Scripts
    • AJAX Scripts
    • ASP Scripts
    • ASP.NET Scripts
    • CGI & Perl Scripts
    • Flash Scripts
    • Java Scripts
    • JavaScript Scripts
    • PHP Scripts
    • Python Scripts
    • Remotely Hosted
    • Tools and Utilities
    • XML Scripts
  • Answers
  • Online Services
  • Tools

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

By Akash Mehta | on Mar 19, 2008 | 2 Comments
PHP Tutorials
  • Tweet
  • Share
  • Tweet
  • Share

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).

Share this story:
  • tweet

Tags: AkismetPEARphp tipsPHP TutorialsXML

Author Description

2 Responses to “5 PEAR gems: free php scripts that will help you code quicker”

  1. March 25, 2009

    Web Proxy Log in to Reply

    You made some good points there. I did a search on the topic and found most people will agree with your blog.

  2. December 5, 2009

    ScriptoManiac Log in to Reply

    Nice post..Keep them coming :) Thanks for sharing.

You must be logged in to post a comment.

Connect With Us

RSSSubscribe 0Followers 492Likes
  • Popular
  • Recent
  • Comments
  • Creating Energy Spheres in Photoshop

    Apr 15, 2008 - 96 Comments
  • Easy Screen Scraping in PHP with the Simple HTML DOM Library

    Aug 6, 2008 - 20 Comments
  • Calculating date difference more precisely in PHP

    Mar 7, 2008 - 13 Comments
  • When Does Hosting Your Website in the Cloud Make Sense?

    Oct 8, 2010 - 2 Comments
  • Fun with the Microsoft Managed Extensibility Framework Part 2

    Oct 6, 2010 - 0 Comment
  • Fun with the Microsoft Managed Extensibility Framework Part 1

    Sep 22, 2010 - 0 Comment
  • Website Management on the go with the iPad

    I appreciated your post, but I was looking for something I didn't...
    November 24, 2012 - drmoderator
  • Creating Energy Spheres in Photoshop

    I'm a little stuck down here especially at the step of creating the...
    November 23, 2012 - sarah
  • Running background processes in PHP

    Can you give an example? As see it, you can use this only when you...
    November 16, 2012 - Shaked Klein Orbach
Developer Resources
  • Tutorial Directory
  • Learn HTML
  • Learn PHP
  • Learn CSS
  • Learn AJAX
  • Learn JavaScript
  • Learn Pear
  • White Papers
  • Resources
    • NetVisits Web Directory
    • Realtor Pixels
    • Answers On The Run
    • Ask A Geek
  • Recent Posts

    • When Does Hosting Your Website in the Cloud Make Sense?
    • Fun with the Microsoft Managed Extensibility Framework Part 2
    • Fun with the Microsoft Managed Extensibility Framework Part 1
    • Website Management on the go with the iPad
    • Code Contracts in C# 4.0 – Part 1

    Calendar

    May 2013
    M T W T F S S
    « Oct    
     12345
    6789101112
    13141516171819
    20212223242526
    2728293031  

    Recent Comments

    • drmoderator on Website Management on the go with the iPad
    • sarah on Creating Energy Spheres in Photoshop
    • Shaked Klein Orbach on Running background processes in PHP
    • Thomas Cuvillier on How To Upload Files Using PHP
    • rizal aditya on Extracting text from Word Documents via PHP and COM
    • Home
    © 2003 - 2013 DeveloperTutorials.com. All Rights Reserved. Privacy Policy.