• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

8. The eBay API > 108. Search with PHP 5 and a Web Services Interface to the XM...

Search with PHP 5 and a Web Services Interface to the XML API

Connect PHP 5 to the eBay API with the Services_eBay PEAR package.

Like many web services, the eBay API comes in multiple flavors. There’s the original XML-over-HTTPS POST interface used by most of the hacks in this chapter, a format that’s quite similar to REST [Hack #107] . There’s also a newer, more fashionable SOAP interface, which uses the Doc/Literal format.

Both have benefits and weaknesses. Pure XML is easy to produce and consume on any platform, something that’s vital given the shaky state of PHP’s SOAP support. However, SOAP has the advantage of eliminating the trouble of manually parsing XML into usable data structures.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint