Home arrow PHP arrow Using Yahoo Web Services to Perform Searches with an Object-Oriented Approach

Using Yahoo Web Services to Perform Searches with an Object-Oriented Approach

If you’re a PHP developer who wants to take the first steps toward building web applications that interact with specific web services, in this article series you’ll find an approachable guide to implementing some of the most useful search services provided by Yahoo! by using a few simple PHP scripts.

TABLE OF CONTENTS:
  1. Using Yahoo Web Services to Perform Searches with an Object-Oriented Approach
  2. Building a web search class with PHP 5
  3. Testing the previous “WebSearchService” class
  4. Building a video searching class with PHP 5
By: Alejandro Gervasio
Rating: starstarstarstarstar / 2
February 12, 2008

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

As you’ll possibly recall, in the last tutorial of this series, I finished discussing the use of the popular Yahoo! Image and Video Search services with PHP 5 by utilizing some custom PHP functions that were actually very easy to grasp and code. Basically, I defined a bunch of procedural functions for implementing a specific Yahoo! Web Service, and for creating small, yet efficient, pieces of code that can be reused easily within the context of different PHP 5 applications.

Implementing one or more Yahoo! Web Services by way of a procedural approach has certain advantages, since this procedure can be tackled without the use of sophisticated programming techniques. And it only requires an intermediate background in some of the most common PHP native functions, such as the familiar “file_get_contents(),” the “foreach” construct, and a few others.

However, at this point it’s quite possible that the following question is already spinning in your mind: what should I do if I need to implement a specific Yahoo! web service within an existing PHP 5 application that has been previously built using an object-oriented approach? Well, actually I’m glad to see you came up with such a useful dilemma!

Coupling a concrete Yahoo! web service with an existing object-based PHP 5 application isn’t as difficult as it may seem at first sight, particularly if you’ve spent some time working with classes and objects. And speaking of PHP classes, they bring me straight to the subject of this fifth part of the series, since in the next few lines I’m going to show you how to implement some of the Yahoo! Web Search Services that you learned in the previous articles, but this time using the object-oriented paradigm.

Sounds pretty interesting, right? In simple terms, my plan will consist of creating some compact and modular PHP 5 classes, which will define a few basic methods for working with the different web services offered by Yahoo!.

Hopefully, by the end of this article, you’ll be equipped with the required background to implement one or more of these useful Yahoo! search services by using an object-based approach. Thus, let’s get rid of the preliminaries and start learning how to achieve this goal with PHP 5. It’s going to be an instructive journey, trust me!



 
 
>>> More PHP Articles          >>> More By Alejandro Gervasio
 

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort
   

PHP ARTICLES

- Hackers Compromise PHP Sites to Launch Attac...
- Red Hat, Zend Form OpenShift PaaS Alliance
- PHP IDE News
- BCD, Zend Extend PHP Partnership
- PHP FAQ Highlight
- PHP Creator Didn't Set Out to Create a Langu...
- PHP Trends Revealed in Zend Study
- PHP: Best Methods for Running Scheduled Jobs
- PHP Array Functions: array_change_key_case
- PHP array_combine Function
- PHP array_chunk Function
- PHP Closures as View Helpers: Lazy-Loading F...
- Using PHP Closures as View Helpers
- PHP File and Operating System Program Execut...
- PHP: Effects of Wrapping Code in Class Const...

Developer Shed Affiliates

 


Dev Shed Tutorial Topics: