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.
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.
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.
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.
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.
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.
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.
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.
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.
Download PHPMailer | View Documentation
- Subscribe to the NETTUTS RSS Feed for more daily web development tuts and articles.

Nice Article!
First! :)
1sT
MWHAHAAA good list
dam 2nd!
philo u win i give up my title!
thanks for the listing…
:)
Great resources listed here
Luky Number 3!
wft?
The Lucky number is 7 not 3
Really extremely useful, some of them I already use, but I gonna deep into them to know more. Thanks!
Give decent feedback is an art these days.
Great post. Never worked with S3, XML-RPLX and SimplePie. Will check those soon.
great article..!
Jeffrey can you please upload a screencast on how to integrate reCAPTCHA on my PHP site ?
That’d be extremely useful…
Hey Sefat. Sure – I’ll make a note to cover it soon.
Thanks Jeffrey, I second this. :)
Great resources for all developers.
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.
Yoosuf – For that matter, every tutorial on the web is “duplicating” and “reinventing”.
@Jeffrey, I agree.
@Yoosuf, Jeffrey’s a great teacher so I’d rather follow his screencast then an article on the internet.
me too I’m a fan of Jeffrey’s screencast! ;)
Wow Jeffrey, great man u are!
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…
Amazon S3 is THE ANSWER to everything storage. Neither for noobs nor geniuses. Incredibly handy. Ask the *tuts people, they store everything there.
Excellent list, very helpful! Thanks!
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)
What new stuff do you want? Offer some ideas.
@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
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 :)
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.
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.
Take the time and send a detailed complaint to Jeffrey via email. Don’t spam perfectly fine articles with your rubbish!
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
ehem,
thanks for the link.
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!
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.
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.
@Jake,
I would like to see that article too.
i think smarty is out of date. Not the best method to divide code from design.
Pchart is major stuff, it is a weapon in my arsenal.
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.
And Justin Shreve :)
Swift Mailer http://swiftmailer.org/ rocks!
Dwoo http://dwoo.org/ is newer than Smarty.
Swift Mailer is LOADS better than PHPMailer. They just came out with a new version as well.
‘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.
SMARTY isn’t a template language. SMARTY is the castrated evil twin of PHP
Yeah – down with Smarty! I used TinyButStrong
Phpmailer is bad !
Swiftmailer is good.
I didn’t know pChart and this library seems cool.
can u please tell the reason u like swiftmailer over php mailer ?
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.
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.
thanks!
Really useful!
pChart looks awesome. I’ve used a flash based chart system, but this looks much more flexible.
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.
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
Last I read HTML 5 final spec has a 2020 release so I hope you’re using “near future” pretty loosely! Ha! Cheers.
:)
3) I agree. I’ll work on something similar.
4) Have a couple scheduled.
5) Just launched a new contest.
What about frameworks that may incorporate a lot of this stuff into a ‘one-stop-shop’, like Zend, CakePHP etc?
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.
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/
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 =)
*cool*
pChart just made my life :P
NICE post guys
really great list, thx
Thank you very much for this article .. it helps me a lot
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 !!!
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 ..
Thanks you very much. Keep up
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.
thank you
I have actually found libchart to be much easier to setup and use than pchart for PHP charting
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.
this article = WIN.
Thank you for this awesome list :)
Superb share :D thanks guyz
thanks for your list…
would like to see that in detail for different topics (php > graphics, php > antispam tools, php > file services, …)…
Great list. Most of them i use already, but i’ll be checking up on the rest.
great article..
If you are going to use a lot of JSON, consider JSON-RPC instead of XML-RPC.
http://jsonrpcphp.org/
Smarty and Akismet will make my day. Thanks for sharing your collection.
Hey Guy Gr8 article but can any body help me… i want to combine reCaptcha and PHPMailer … any clues guys… Thanks
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]
really useful list
Yes this is a good list some of them are very known.
my friend told me that’s this post is very important to read…and i’ve got that i need…thank’s
OH MY!!!! PHP MAILER is exactly what I was searching for …. THANKS! :D
Thanks for article.