HomePHP Defining Some Custom PHP Functions with Yahoo Web Services
Defining Some Custom PHP Functions with Yahoo Web Services
Welcome to the fourth installment of the series “Using Yahoo! Web Services with PHP 5.” Made up of six approachable tutorials, this series provides you with the right pointers to start using these useful web services within the context of your PHP 5-driven applications. It complements the corresponding theoretical concepts with a decent variety of hands-on examples.
As you may know, the incorporation of popular web services, such as image and video searches, into existing web applications can be an efficient approach to expanding their functionality and making them more attractive to end users. Based upon this concept, Yahoo! has made a set of powerful APIs available for PHP developers, which, among other useful things, will let you couple its most relevant web services to your own PHP applications without needing to deal directly with data served in WSDL (Web Service Description Language).
However, as with everything in Life, learning how to put those Yahoo! services to work for you takes some time. If you read this series of tutorials, it will hopefully turn the overall educational process into a painless experience.
Now that you've read this brief introduction, you’ll probably recall that in my last article of this series, I finished discussing how to implement some of the most useful web services provided by Yahoo! by using only a few basic PHP functions. In this way, you learned not only how to build simple mechanisms to call up these search services directly from your PHP 5 applications, but how to format the corresponding search results via a few basic (X)HTML tags.
However, all the practical examples that I gave you previously used a rather primitive procedural approach to implement the services in question within the context of different PHP 5 scripts. Logically, these examples can be really useful for learning the basic concepts surrounding the use of these search services, but undoubtedly, it’s necessary to modify and improve their source code to make it more compact and completely reusable.
Therefore, in this fourth chapter of the series, I’m going to show you how to use all of the Yahoo! Web Services discussed earlier, but this time by defining some custom PHP functions. In this way, it will complete the implementation of those services using a procedural approach.
Are you ready to learn how to use some custom PHP functions to take advantage of these helpful Yahoo! Web Search Services? Great! Let’s get going!