Web APIs with PHP

4 comments | Posted: 22 August 06 in Books, by Nathan Smith

Web APIs with PHP If you are looking for a good book describing how to make use of the various web services out there, look no further. Professional Web APIs with PHP is a compliation of several helpful tutorials covering the more popular web application programming interfaces (API) available. It was written by the talented Paul Michael Reinheimer, who is a Zend Certified Engineer and member of the PHP Security Consortium. He has done a great job covering what at times seems to be a somewhat esoteric topic. In his own words, here is the approach taken in this book:

Every time I approached a new API, I was spending 80% of my time trying just trying to make the first call or two. Once those were out of the way subsequent calls were fast, and in many cases almost trivial to write. So I slowly refactored my book into a tool to help developers get through those first few difficult calls…

I appreciated his dive-right-in approach to understanding the differing APIs. Considering that some of the large scale API documentation totals in the range of 500 pages each, the brevity and clarity of the book’s explanations were a welcome contrast. He also covered some of the differences between REST and SOAP, and why some APIs give preference to one over the other.

The main APIs that are addressed are those which tend to be thought of as large and revenue driven – eBay, Google, PayPal, Amazon and FedEx. Other community oriented APIs such as Flickr and Del.icio.us are also covered, as well as the National Weather Service. As a lead in to all these topics, he covers the parsing of basic web feed formats like RSS and Atom, in order to give a general feel for dealing with XML data. Towards the end of the book, the necessary methods for creating your own API are demystified.

Another thing I liked is that this book doesn’t spread itself too thin, attempting to be the end-all for API instruction by covering a smorgasbord of server side languages. Rather, it focuses solely on PHP and does quite a fine job of it. I find that approach so much more helpful. The likelihood of someone knowing one language well, and wanting to learn a variety of APIs is much better than someone wanting to learn a few APIs, in a ridiculous number of languages.

His site tagline says it best, “PHP: Because friends don’t let friends code Java.”

Reinheimer does well by avoiding the absurdity which plagues far too many programming books, instead opting to focus on what is applicable from a practical standpoint. So, whether you are looking to create an online book store that interfaces with Amazon, sell your own products via PayPal, or ship FedEx products that need to be tracked on the web, this book is for you. The thoroughly explained examples will get you on the right track in no time.

Discuss This Topic

  1. 1 Nate Klaiber

    Sounds like a good book, and I am a big fan of wrox books in general. API’s can be tricky at first, and, as said above, you spend a lot of time getting a few calls and it’s a breeze after that. I am glad they took the time to put together this book to help speed up that process. Though I don’t use all of those different API’s (nor would I have a need to right now), I think it would be great for reference and understanding.

    Well, I just finished Dont Make Me Think and am almost done with Prioritizing Web Usability – and I have DOM Scripting and DHTML Utopia in the mail today – so Ill just add this to my wish list and check it out more after that :)

    Thanks for the review!

  2. 2 Scott

    Sweet! Just what I was needing, without even knowing it. It’s in the mail now!

  3. 3 Nathan Smith

    Nate: Agreed, one probably wouldn’t use all APIs, but it’s good for reference.

    Scott: Cool, I’m glad I was able to make you aware of it. I think you’ll like it.

  4. 4 Paul Reinheimer

    Thank you for the kind words.

    I apologize to all those who have purchased the title but have been unable to download the code from the wrox site, I am working with them now to resolve that.

    Additionally, if you run into any problems, or find any errors in the book please feel free to drop me an email, my email is strewn throughout the book but just in case it’s paul {at} preinheimer {period} com.



Comments closed after 2 weeks.