9 Extremely Useful and Free PHP Libraries

A lot of functionality is shared among applications – like sending emails or preventing spam. In the spirit of reusing the wheel instead of reinventing it, here are nine free web libraries that you can use in your next program which will dramatically increase your efficiency.

1. ReCAPTCHA

The reCAPTCHA library allows you to integrate an advanced CAPTCHA system on your website, which helps keep spam bots from posting on your website. The visual CAPTCHA also includes a helpful audio feature.

In addition to the reCAPTCHA service, the library also includes an API for the “Mailhide” service which hides emails from spammers.

The API is free and easy to implement on your site and also gives back to the community as it translates scanned books.

ReCAPTCHA

Download ReCAPTCHA | Get an API Key | Documentation

2. Akismet

Akismet was covered in a previous NETTUTS article.

Akismet is a free service that can be used on most small sites – or used on larger sites for a small fee. The library works by comparing comments to a database of existing spam comments provided by other users. The library can then decide to flag the comment for moderation or allow it through. Everyday the library grows and the service improves.

Akismet

Implement Akismet

3. Services_JSON

JSON is a handy format for transmitting human readable data. Not everyone has made the move to PHP5 which has included JSON support since version 5.2.0. This small library enables you to implement JSON functionality into your own applications if you are not using a recent version of PHP.

JSON

View Services_JSON

4. Smarty

Smarty is a template engine which was formally a sub-project of the PHP project. Smarty provides many powerful features such as loops, variables, and a great caching system. The library has many years under its belt and is nearing its version three release.

Smarty

Download Smarty | View Documentation

5. pChart

In addition to displaying text data in your application, it can also be useful to show data in a more visual format. This can be done with a slew of options like pie charts and bar graphs. pChart is a script that allows you to create charts and graphs from SQL queries or manually provided details. The script is baked by GD to create the images. There is also a main focus on the aesthetics; so it creates some beautiful work.

pChart

Download pChart | View Documentation | View Demos

6. SimplePie

SimplePie is another article that been covered on NETTUTS a few times.

SimplePie allows you to easily pull in syndicated content (like RSS feeds). It’s also been integrated with a lot of different platforms and language sets; it should be able to deal almost any feed in a variety of ways.

SimplePie

Download SimplePie | View Documentation | Extending SimplePie to Parse Unique RSS Feeds

7. XML-RPC PHP Library

Applications sometimes use functionality to “ping” other sites when an action has occurred (known as trackbacks). This is done by using a protocol called XML-RPC. The XML-RPC PHP library also allows you to integrate the functionality into your website.

XML-RPC

Download XML-RPC PHP | View Documentation

8. Amazon S3

Amazon provides a nice service to work in the cloud, called “S3″. Nettuts+ even uses it to store the images seen in each article. There is a nice Amazon S3 library that doesn’t require any third party tools and allows for large file uploads.

Amazon S3

Download Amazon S3 PHP Class

9. PHPMailer

Most applications send out an email in some form, but usually rely on the basic php mail() function. PHPMailer is an existing powerful class that allows you to send different types of emails – from basic text to rich formatted emails. These emails can also include attachments or custom headers.

Sending Mail

Download PHPMailer | View Documentation

  • Subscribe to the NETTUTS RSS Feed for more daily web development tuts and articles.


Note: Want to add some source code? Type <pre><code> before it and </code></pre> after it. Find out more
  • http://www.philohermans.nl Philo

    Nice Article!
    First! :)

  • paul

    1sT

    MWHAHAAA good list

    • paul

      dam 2nd!

      philo u win i give up my title!

    • http://takien.com takien

      thanks for the listing…
      :)

      • http://www.blackberrymobile.in Blackberry mobiles

        Great resources listed here

  • http://franciscocosta.com Francisco Costa

    Luky Number 3!

    • http://wdlog.com António Lopes

      wft?

    • http://www.videoconmobilephones.in Videocon mobiles

      The Lucky number is 7 not 3

  • http://www.dsaportfolio.com.br Diego SA

    Really extremely useful, some of them I already use, but I gonna deep into them to know more. Thanks!

  • http://www.mikevanhoenselaar.nl Mike van Hoenselaar

    Give decent feedback is an art these days.

    Great post. Never worked with S3, XML-RPLX and SimplePie. Will check those soon.

  • http://twitter.com/sefat Sefat

    great article..!

    Jeffrey can you please upload a screencast on how to integrate reCAPTCHA on my PHP site ?

    That’d be extremely useful…

    • http://www.jeff-way.com Jeffrey Way

      Hey Sefat. Sure – I’ll make a note to cover it soon.

      • Meshach

        Thanks Jeffrey, I second this. :)

      • http://www.olivemobiles.in/ Olive Mobiles

        Great resources for all developers.

    • http://eyoosuf.blogspot.com/ Yoosuf

      common, its really easy, http://recaptcha.net/plugins/php/ gives the complete view, so why a Screen cast,

      @Jeff, better to reduce the duplicating and re inventing. please.

      • http://www.jeff-way.com Jeffrey Way

        Yoosuf – For that matter, every tutorial on the web is “duplicating” and “reinventing”.

      • Meshach

        @Jeffrey, I agree.

        @Yoosuf, Jeffrey’s a great teacher so I’d rather follow his screencast then an article on the internet.

      • http://laranzjoe.blogspot.com lawrence77

        me too I’m a fan of Jeffrey’s screencast! ;)
        Wow Jeffrey, great man u are!

  • http://www.mydevwares.com/ myDevWares

    Hehe, love the post. I’m still curious about Amazon S3…is that like a cloud image hosting thingamajiggy?

    Would love to see more compilations of PHP resources…

    • http://www.thegraphicdesignschool.com Jean-Marc

      Amazon S3 is THE ANSWER to everything storage. Neither for noobs nor geniuses. Incredibly handy. Ask the *tuts people, they store everything there.

  • http://codingpad.maryspad.com mary

    Excellent list, very helpful! Thanks!

  • http://eyoosuf.blogspot.com/ Yoosuf

    these days nettuts produce pointless articles, common Jeff, we want some new stuff and something is really needed for the industry!

    (i am not distracting the Author of this post, i am generally talking)

    • http://www.jeff-way.com Jeffrey Way

      What new stuff do you want? Offer some ideas.

      • http://eyoosuf.blogspot.com/ Yoosuf

        @Jeff,

        Some Stuff about

        Drupal, Joomla, PHPBB, etc.. Shopping cart application, RIA development, Social Network Application Development, Some new Innovative thinking of some Best UI engineers, some Best Interviews with Mr.jQuery.

        rather than limiting the stuff to jQuery can produce some article on ExtJS, YUI, Prototype 1.6 and Djo and allot more….

        also can include some .NET and Ajax Technology, how to make Adobe Flex Application bla bla bla…

        guess its understandable, i also planing to write to Nettuts, but i am not because i am expecting its rather than a blog, its a Best resource site.

        so keep rocking…., stop duplicating….

        hmmm, i guess the number of comments gonna increase for this post like nothing he he he

      • http://eyoosuf.blogspot.com/ Yoosuf

        Very recently i saw http://net.tutsplus.com/tutorials/php/a-better-login-system/ it was really cool and really wanted by a Web developer. so such type of tuts are really appreciated.

        in simple word i am saying, i am reading the article than commenting, i love reading, so please!!!!!, may be some folks interested in commenting, what they can do is only commenting :)

      • http://www.nettuts.com Jeffrey Way

        Unfortunately, if we cover everything under the sun, as you have suggestead, we’ll lose subscribers. That’s why we mostly cover HTML/CSS, PHP, Javascript/jQuery, etc.

    • http://www.beginner-web.com Tarek Farage

      Thats a pretty strong statement. Pointless to you maybe….as you can see by the comments many people are happy with it:)

      I think its great, keep up the awesome work.

    • http://james.padolsey.com James

      Take the time and send a detailed complaint to Jeffrey via email. Don’t spam perfectly fine articles with your rubbish!

    • http://spoonfedproject.com/ Blaine

      Pointless for you maybe, but not for the majority of others. Obviously envato is doing something right, otherwise they wouldn’t be expanding at such an exponential rate.

      If these articles are irrelevant for you, why not suggest a tutorial?
      http://psdtuts.uservoice.com/pages/nettuts_tutorial_suggestions

      • http://eyoosuf.blogspot.com/ Yoosuf

        ehem,

        thanks for the link.

  • http://james.padolsey.com James

    Please don’t use reCaptcha – if you do then you’ll be committing one of the worst usability crimes ever!

    Also, can we stop with the “First” comment nonsense! @Philo – you obviously didn’t read the whole article before commenting!

    • http://www.philohermans.nl Philo

      I did took a quick look through the list, i know most of them so didn’t read everything because i already knew what it was. But besides that it’s still a nice article! & My RSS feed refreshes every 5 min, so i get a notification pretty fast :)

      The “firs”t thing has became a kind of a standard lol
      Sure i can stop the “first” thing, but I’m sure someone else will do it instead.

      • Jake

        Lmao @ Philio, kudo’s

        And i agree with the recaptcha, any kind of captcha, or anti-captcha systems. They’re terrible, there’s a dozen steps you can take to remove 99% of spam before even needing to consider anything like this.

        Unfortunately it seems to have become a bit of a standard, with small blogs implementing it for god knows what reason, because they think they’re supposed to.

        Perhaps an article on different methods of anti spam, pro’s and con’s, and for various elements (direct mailto: links, forms and so on).

        So people can see the alternatives. That’s my suggestion anyway.

      • http://www.eraxa.com Sirwan

        @Jake,

        I would like to see that article too.

  • choise

    i think smarty is out of date. Not the best method to divide code from design.

  • http://creativeacclaim.com AlfredN

    Pchart is major stuff, it is a weapon in my arsenal.

  • http://www.eraxa.com Sirwan

    This is the type of Articles i would like to see more of.

    We all know there are plenty of things that we dont encounter, and it is really useful to have articles that reduces the research time for us designers.

    Thanks Jeffrey.

    • http://www.eraxa.com Sirwan

      And Justin Shreve :)

  • http://ramaboo.com/ David Singer

    Swift Mailer http://swiftmailer.org/ rocks!

    Dwoo http://dwoo.org/ is newer than Smarty.

    • http://www.chriswilliams.me Chris Williams

      Swift Mailer is LOADS better than PHPMailer. They just came out with a new version as well.

  • http://www.kevinquillen.com Kevin Quillen

    ‘Give decent feedback is an art these days.’

    Seconded. Why do people fill up spots with ‘FIRST LOL’ and the like? This isn’t digg.

  • Pingback: popurls.com // popular today

  • http://www.mediengestalter.cc Andi

    SMARTY isn’t a template language. SMARTY is the castrated evil twin of PHP

    • EllisGL

      Yeah – down with Smarty! I used TinyButStrong

  • http://www.mika-web.com/ Mikaweb

    Phpmailer is bad !
    Swiftmailer is good.

    I didn’t know pChart and this library seems cool.

    • http://fonearena.com Varun

      can u please tell the reason u like swiftmailer over php mailer ?

  • SomeFunkyDude

    Nice collection, I’m gonna have to check out Smarty and the ReCAPTCHA those look good.

    PHPMailer and Swift Mailer are both popular choices for sending php mail.

  • http://www.152.org Ernest Leitch

    I initially had some big problems with phpmailer because it wouldn’t work with attachments. The main reason I wanted to use the script. I had to dig around the net to find out there was a problem with the value it used for line returns.

    I would recommend using it just make sure to update the $LE variable to “\n” on *nix systems.

  • http://laranzjoe.blogspot.com lawrence77

    thanks!
    Really useful!

  • http://parisvega.com/blog Paris Vega

    pChart looks awesome. I’ve used a flash based chart system, but this looks much more flexible.

  • http://botsko.net Mike

    I wouldn’t agree with including Smarty on this list. It’s too outdated by todays standards and adds, in my opinion, a thick layer of code into your application for very little benefit that can’t be achieved with php itself. I see little value in switching standard php tags for smarty tags.

  • http://vectormesh.info Shibi Kannan

    Fantastic collection, I would like to see more practical “get your hands dirty in coding” style articles. There are countless websites that offer lists of useful stuff like this but what use is the list if you dont know how to use atleast one of those wonderful things in your work. The reason I keep coming back to tuts sites is the amazing screencasts, Kudos to Nettuts team and Jeffrey I have some interesting topics for you for upcoming screencasts:
    1. A visual comparison of admin panels of three main CMS platforms like WordPress, Joomla and Modx (I have chosen these three because they seem to have a lot of community behind them – obviously I am a wordpress guy !!!)
    2. CSS3 implementation – future of CSS
    3. HTML5 – video and audio stuff – what can we expect from the web in the near future
    4. Interviews with leading web designers – like the one with Chris Coyier
    5. More contests
    Keep up the good work
    Best Regards

    • http://twitter.com/nicluciano Nic

      Last I read HTML 5 final spec has a 2020 release so I hope you’re using “near future” pretty loosely! Ha! Cheers.

    • http://www.jeff-way.com Jeffrey Way

      :)

      3) I agree. I’ll work on something similar.
      4) Have a couple scheduled.
      5) Just launched a new contest.

  • http://chief.fishbucket.com/ chief

    What about frameworks that may incorporate a lot of this stuff into a ‘one-stop-shop’, like Zend, CakePHP etc?

  • http://www.dragonblogger.com Dragon Blogger

    Nice post and useful php tools, I use akismet for my blog, recaptcha I was considering, most others haven’t figured I need for my blogs yet.

  • http://twitter.com/nicluciano Nic

    Good article, I would like to maybe see more libraries that solve modern problems other than libraries that are slowly becoming less important like SimplePie, Services_JSON, and even Smarty really. Here’s a library I’ve been using pretty frequently called “twitterlibPHP”. It’s a small PHP class that has all the same functionality of the RESTful Twitter API. I believe the main contributor is actually putting a new version out very soon that’s supposed to be pretty great. http://code.google.com/p/twitterlibphp/

    • João Aliano

      Hey PG, twitterlibPHP seems pretty coold and quite useful.
      Since tweeting has become a sign of life under the Web’s Sun, such an article would really invite a lot of interest.

      pChart also seems very very very nice =)

      • João Aliano

        *cool*

  • Pingback: Daily Links | AndySowards.com :: Professional Web Design, Development, Programming, Hacks, Downloads, Math and being a Web 2.0 Hipster?

  • Evan

    pChart just made my life :P

    NICE post guys

  • http://web-site.te.ua solexy

    really great list, thx

  • http://www.permanaj.net Permana Jayanta

    Thank you very much for this article .. it helps me a lot

  • Pingback: Daily Digest for 2009-04-07 | Pedro Trindade

  • http://www.gunk-design.co.uk Andy

    Smarty is terrible…

    Having HAD to use it at work for a number or simple and complicated projects it just makes things harder, is extra work and even slow.

    Don’t use it unless you really have to !!!

    • http://fonearena.com Varun

      Smarty is extra work .. its a templating engine ..

      I have used it a lot of times .. If you use caching .. can handle even a digg frontpage :D

      Its got a learning curve though ..

  • Pingback: links for 2009-04-08 | Emrah Sağlık

  • http://www.danhbaweb20.com/ Danh ba web 2.0

    Thanks you very much. Keep up

  • http://www.osicoding.com SM

    Thanks a lot for the article. Although, Smarty literally gives me indigestion. I would just create a simple template class to use for my applications with some output buffering. I like to keep things simple.

  • Pingback: Påsktips för dig som börjat med PHP | PHP-kurs

  • http://www.cornerofart.com Abdullah alhourani

    thank you

  • Stephen

    I have actually found libchart to be much easier to setup and use than pchart for PHP charting

  • Pingback: Die t3n-Links zum (Oster-)Wochenende am 09.04.2009 » t3n Magazin

  • http://fonearena.com Varun

    Hi Guys,

    Such a gr8 site and gr8 articles ..

    Good list

    Will add AdboDB to that list incase you want a stand alone Database Library.

  • Mark

    this article = WIN.

  • Pingback: NETTUTS.com: 9 Extremely Useful and Free PHP Libraries : WebNetiques, LLC : Website Developers in Minneapolis, MN

  • Pingback: NETTUTS.com: 9 Extremely Useful and Free PHP Libraries : Dragonfly Networks

  • http://frieze.dk Bjørn Friese

    Thank you for this awesome list :)

  • http://www.blastingart.com Art

    Superb share :D thanks guyz

  • http://www.1klang.de frank katzer | 1klang.de internetagentur / fulda petersberg

    thanks for your list…
    would like to see that in detail for different topics (php > graphics, php > antispam tools, php > file services, …)…

  • Pingback: BlogBuzz April 11, 2009

  • http://www.recyclingtheweb.com Aaron Smith

    Great list. Most of them i use already, but i’ll be checking up on the rest.

  • Pingback: Bookmarks for April 9th through April 12th | Maximi maxima maxi max ist da