Skip to Content
eBay Hacks, 2nd Edition
book

eBay Hacks, 2nd Edition

by David A. Karp
June 2005
Beginner
463 pages
14h 19m
English
O'Reilly Media, Inc.
Content preview from eBay Hacks, 2nd Edition

Receive Search Results via RSS

Use PHP to distill eBay search results into a format that can be read by an RSS news aggregator.

RSS is a popular way to track changes to news sites and blogs. When a site adds new content, it updates its RSS feed with information on the new item, including the title, URL, and description.

Using a news aggregator program, you can subscribe to RSS feeds for your favorite sites. These programs watch for changes in RSS feeds. When they find something new, they retrieve the listing and display it to you. This allows you to easily keep up-to-date on hundreds of web sites without needing to continually go back to each site looking for new material.

While RSS is most commonly used to track articles and blog posts, you can also use it to track eBay listings. This hack creates a PHP 5 script that searches eBay and converts the results to RSS using XSLT. This hack reuses many of the components from “Create Custom-Formatted eBay Search Results with the REST API” [Hack #107] , so you may want to read that one before continuing with this one.

RSS readers, however, can’t understand eBay’s XML results, so you need to convert the output into RSS. Conveniently, RSS is also an XML-based format, so it’s easy to use XSLT to turn eBay XML into RSS XML.

Here’s an XSL stylesheet that does that:

 <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:date="http://exslt.org/dates-and-times" xmlns:ebay="http://ebay.com/api/functions" xmlns:func="http://exslt.org/functions" ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

eBay Hacks

eBay Hacks

David A. Karp

Publisher Resources

ISBN: 059610068XErrata Page