Summary


This chapter introduced the SOAP messaging protocol, with a quick look at the HTTP protocol that carries it from client to server. It also took a detailed look at the Google SOAP format and its element parts. This information was used to manually generate an API request and examine Google's response. Once the nittygritty portion of the protocol was discussed, the NuSOAP tool was introduced, which made dealing with requests considerably easier. At first a simple search interface was presented, using NuSOAP, rather than your own manual requests. Gradually this example was added to, to present a full-featured search engine, matching that of an example site. Other topics such as fudging or suggesting alternate results, monitoring search usage, or caching results to save on queries were also discussed. Finally, the search framework was used to monitor key queries over time, and warn if placement changed, and again to present search results from multiple domains at once. Overall, the main goals of this chapter were as follows:

  • A good understanding of the transaction behind a SOAP request to Google

  • Using NuSOAP to handle the request

  • Presenting a search interface

  • Caching results and monitoring usage

  • Fudging results and presenting suggested topics

  • Monitoring keywords over time

A few security-related topics were also discussed, the overall lesson being, always, always, filter incoming data, especially when it is destined for a database. The SOAP information obtained in this chapter will be useful when looking at the Amazon API in the next chapter, which allows developers access through both SOAP and REST.




Professional Web APIs with PHP. eBay, Google, PayPal, Amazon, FedEx, Plus Web Feeds
Professional Web APIs with PHP. eBay, Google, PayPal, Amazon, FedEx, Plus Web Feeds
ISBN: 764589547
EAN: N/A
Year: 2006
Pages: 130

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net