Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

O'Reilly Network:
PHP 5 & Services_Ebay
Jan 28, 2005 @ 13:03:16

In a new article from the O'Reilly PHP DevCenter today, they discuss a topic that's be come quite popular these days - interfacing PHP 5 with the eBay API.

Over the last ten years, eBay has emerged as a platform where people can buy and sell practically anything. With more than 135 million users worldwide, eBay is a thriving online marketplace. Best of all, eBay isn't constrained by HTML. By using eBay's web services APIs, members of the eBay Developers Program can hook into the eBay platform using XML to integrate eBay into their own applications.

Like many web services, the eBay API comes in multiple flavors. There's the original XML-over-HTTPS POST interface, a format that's quite similar to REST. There's also a newer, more fashionable SOAP interface, which uses the Doc/Literal format. PHP programmers have a third alternative, which combines the best parts of both interfaces: Services_Ebay. Written primarily by Stephan Schmidt, Services_Ebay is a PEAR package that wraps around the XML API to provide an object-oriented interface to eBay. Additionally, it takes advantage of several new PHP 5 features to create powerful code that's simple to use. You can't run this code under PHP 4 because PHP 5 plays such a key role.

With this simple package you can interface easily with the eBay API. Simple functions such as GetSearchResults, ItemProperties, and GetItemPrice make fetching just about any piece of data on any item on their site a breeze.

tagged:

Link:


Trending Topics: