The Learning Curve

New tricks for an old dog.

Archive for the ‘eBay’ Category

The simplicity of the solution

It finally dawned on me why scripts or programs used to read RSS and XML files are so complicated. Programmers tend to approach the problem by designing for an encounter with any and all files, to read files written for any specification, and which deal with files that aren’t valid. It is the difficult task of designing a Swiss army knife piece of software that is useful and behaves nicely in all circumstances.

God bless programmers. I’m glad I’m not one myself. I can’t qualify for the hair-pulling part of the job specification, having hardly any left to spare.

All I want is a PHP script that can read and manipulate one type of XML file, and one type only, which is the type generated by eBay.

This, I think, I can pull off. Once I learn a little more about programming with PHP.


Written by Tom Fox

05/30/2007 at 7:54 am

A warning about RSS quickies

Although I’m still happy about Really simple RSS . . . really, I have to warn you that I do not intend to leave it at that for long.  One big problem with using SimpleXML alone is that it reads the entire RSS feed into server memory every time the PHP script it run, which is any time the page is loaded.  This is coupled with the fact that eBay’s RSS feeds include every auction listing that satisfies the search criteria.

Suppose, for example, you were to create an eBay RSS feed with more than 50 auction search results, and your page had more than just a small handful of users at the same time, the whole thing would probably blow up by over-taxing your server.

For my purposes (slogging up the learning curve) it is a great first step, but it is not a scalable production solution.

I imagine that the way it should be done, to work properly and efficiently, is to periodically save the RSS feed to a file or database, and to serve the saved results to the site’s visitors from that, and not from memory every time.

How, exactly, to do this a good question, given my limited experience, and I have to think about it some more, and noodle out what is the next step.

I’ll get back to you.

Written by Tom Fox

05/29/2007 at 11:21 am

Have you heard . . .

. . . that as of June 1, eBay is more than doubling the low end of their commission structure paid to affiliates for new users?

Well, now you know that eBay will be paying affiliates $25 (less than 50 per month) and $28 (50 to 1999 per month), for new active users.


Because the low-hanging fruit has already been picked.

Written by Tom Fox

05/29/2007 at 7:32 am

New and improved

My Little Leather Library site is beginning to take shape.

This example page combines the open source design template of Andreas Viklund mentioned in Open source facelift, as modified by me, with an affiliate RSS feed from eBay that was styled using CSS, with my crude PHP code, and syndication through

It’s heading in the right direction, I think, but there is still much yet to do.

Written by Tom Fox

05/28/2007 at 5:36 pm

Really simple RSS . . . really

In January I learned that the eBay advanced search page could embed an affiliate tracking ID in the search results, and the ID would also be included in an eBay RSS feed based upon that search. I’ve been slowly gnawing away at understanding how to include a RSS feed on my website ever since, for the most part. Sometimes it would gnaw on me. Really Simple Syndication (RSS) is conceptually simple, but in practice it’s not so simple at all.

This weekend I discovered that PHP v. 5 had new XML parsing functionality built in, and I stumbled upon a very useful article by Elliotte Rusty Harold, SimpleXML processing with PHP.

The sample code provided in this article works unaltered and straight out of the box with the eBay RSS feed. Here’s an example.

Naturally, I will go in and make it more pretty, but it meets my basic criteria for a successful solution: It works, it’s easy, and it’s cheap.

PS. Also read: A warning about RSS quickies

Written by Tom Fox

05/28/2007 at 11:11 am