Archive for August 28th, 2006

WaxJelly Blog: Simple PHP script using the YouTube API (with pagination)

On the WaxJelly blog today, there’s a new tutorial showing how to combine PHP and the YouTube API interface to grab the information and a thumbnail of videos matching your search.

For the purposes of this tutorial, you’ll only need to change one variable to actually see the script in action. If you don’t have a youtube API developer ID, you can get one for free here. Other than that, this is a primative script that grabs the info, styles it into manageable chunks, and displays the first 4 pages of results.

First, they set up the values they’re defaulting to in the script (GET vars). The call to the REST API is next, passing along the method, developer ID, page, number to show per page, and the tag to search on. The results of this are pulled in with teh file_get_contents and parsed with SimpleXML and looped through, combined with HTML, and outputted into a page looking something like this.

Continue Reading · Add comment

Community News: Web APIs with PHP Book Released

It’s the book everyone’s talking about and the entire PHP community should by! Okay, really, there’s a few blog posts about it, but it’s definitely not one to pass up if you need a quality recource on using web APIs in PHP - Paul Reinheimer’s “Professional Web APIs with PHP: eBay, Google, Paypal, Amazon, FedEx plus Web Feeds“.

Chris Shifflet comments on his blog that, though he hasn’t read it yet:

I know Paul has been working on it for well over a year, and it has already received a positive review from Nathan Smith.

The review gives praise to the book, noting that it provides good examples and helpful tutorials for each of the APIs talked about. The book covers its subject well without trying to “spread itself too thin” by including too much and not focusing on its core - APIs like eBay, Google, FedEx, Flickr, even the National Weather Service.

Even Paul himself comments on the occasion, mentioning what his intentions for the book were and how it changed along the way.

Continue Reading · Add comment

An Introduction to Using the Decorator Pattern with PHP

A decorator class allows you to add more capacity to an existing class while leaving the original class untouched. It has certain advantages over inheritance as you will learn in this first article of a three-part series….

(Advertisement) Rackspace-Managed Servers, Fanatical Support™ Full-Scale Microsoft & Linux Solutions & 0% Network Downtime! Click here now!

Continue Reading · Add comment

DevShed: An Introduction to Using the Decorator Pattern with PHP

In yet another of their looks at using patterns in PHP, DevShed has posted the first part of a new three-part series today covering the Decorator patten, useful for adding new or other functionality to prexisting objects.

Due to the wide range of web applications where the decorator pattern can be successfully applied, over the course of this series, I’ll show you some useful pointers to demonstrate how this pattern works, and how it can be introduced in your own PHP applications with only minor hassles. Before you start reading the rest of this article, make sure that you have a pretty good understanding of object-based programming with PHP, since you’ll see an abundance of material related to this topic.

To help you get started, they start at ground level with a basic class, one to save a string to a file. They then, in a different class, build the Decorator object, adding the ability to reset and display the string. To help out, they also make two other classes to make the string either all uppercase or all lowercase. Finally, they tie them all together, amking an application that adds its functionality on the fly.

Continue Reading · Add comment

Chris Shiflett’s Blog: Zend Gets Another $20 Million

According to this new post on Chris Shifflet’s blog, Zend has recieved another “boost” to their cash flow to the tune of $20 million in a fourth round of funding.

Chris cites both this News.com article and Zend’s own press release on the topic:

The new funds will enable us to expand faster in emerging geographical markets, accelerate our product development and extend the services organization to meet the demands of our growing number of enterprise PHP customers.

He looks at it positively, noting that what’s good for Zend is, ultimately, good for PHP - and this is very good for the company.

Continue Reading · Add comment