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.


Add Comment

Discussion 83 Comments

Comment Page 2 of 2 1 2
  1. Philo says:

    Nice Article!
    First! :)

  2. paul says:

    1sT

    MWHAHAAA good list

  3. Diego SA says:

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

  4. Give decent feedback is an art these days.

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

  5. Sefat says:

    great article..!

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

    That’d be extremely useful…

  6. myDevWares says:

    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…

    • Jean-Marc says:

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

  7. mary says:

    Excellent list, very helpful! Thanks!

  8. Yoosuf says:

    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)

    • Jeffrey Way says:
      Staff

      What new stuff do you want? Offer some ideas.

      • Yoosuf says:

        @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

      • Yoosuf says:

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

      • Jeffrey Way says:

        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.

    • Tarek Farage says:

      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.

    • James says:

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

    • Blaine says:

      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

  9. James says:

    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!

    • Philo says:

      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 says:

        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.

      • Sirwan says:

        @Jake,

        I would like to see that article too.

  10. choise says:

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

  11. AlfredN says:

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

  12. Sirwan says:

    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.

  13. David Singer says:

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

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

  14. ‘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.

  15. Andi says:

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

  16. Mikaweb says:

    Phpmailer is bad !
    Swiftmailer is good.

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

  17. SomeFunkyDude says:

    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.

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

  19. lawrence77 says:

    thanks!
    Really useful!

  20. Paris Vega says:

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

  21. Mike says:

    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.

  22. Shibi Kannan says:

    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

  23. chief says:

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

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

  25. Nic says:

    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 says:

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

  26. Evan says:

    pChart just made my life :P

    NICE post guys

  27. solexy says:

    really great list, thx

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

  29. Andy says:

    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 !!!

    • Varun says:

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

  30. Thanks you very much. Keep up

  31. SM says:

    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.

  32. Stephen says:

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

  33. Varun says:

    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.

  34. Mark says:

    this article = WIN.

  35. Thank you for this awesome list :)

  36. Art says:

    Superb share :D thanks guyz

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

  38. Aaron Smith says:

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

  39. viaria says:

    great article..

  40. Robert Broen says:

    If you are going to use a lot of JSON, consider JSON-RPC instead of XML-RPC.

    http://jsonrpcphp.org/

  41. Module23 says:

    Smarty and Akismet will make my day. Thanks for sharing your collection.

  42. Vijendra says:

    Hey Guy Gr8 article but can any body help me… i want to combine reCaptcha and PHPMailer … any clues guys… Thanks

  43. umkux says:

    All are not cooks that walk with long knives
    bingo gala [url=http://gambling-play-online.com/bingo-gala/]bingo gala[/url] free on line casino game [url=http://gambling-play-online.com/free-on-line-casino-game/]free on line casino game[/url] flower francisco in san [url=http://play-poker-easy.com/flower-francisco-in-san/map.html]flower francisco in san[/url] ballys casino atlantic city nj [url=http://want-online-gambling.com/ballys-casino-atlantic-city-nj/]ballys casino atlantic city nj[/url] grand casino tunica mississippi [url=http://play-casino-free.com/grand-casino-tunica-mississippi/]grand casino tunica mississippi[/url] southpoint casino las vegas [url=http://gambling-play-online.com/southpoint-casino-las-vegas/]southpoint casino las vegas[/url] spirit mountain casino [url=http://want-play-casino.com/spirit-mountain-casino/]spirit mountain casino[/url]

  44. Joomla says:

    really useful list

  45. Bit Doze says:

    Yes this is a good list some of them are very known.

  46. sandra says:

    my friend told me that’s this post is very important to read…and i’ve got that i need…thank’s

  47. OH MY!!!! PHP MAILER is exactly what I was searching for …. THANKS! :D

  48. Disweb says:

    Thanks for article.

Add a Comment

To add a code snippet to your comment, please wrap your code like so: <pre name="code" class="html">YOUR CODE</pre>. You can replace the class name with "js," "css," "sql," or "php." If there are any "<" or ">" within your code, please search and replace them with: &lt; and &gt; respectively.