I was helping a friend find a good price on a powerline Ethernet extender like the one I bought a few months ago, and stumbled upon this bargain:
Luckily I found one cheaper here:
When I showed this to my friend his first comment was "For 1/5 of a mil you'd think they'd include shipping". True, but at least there was no tax.
I don't have any inside knowledge on how the shopping site gets its prices, but I suspect they're using a method called "screen scraping". In this method you just fetch every product web page and try to parse out the HTML to find where the number you want is located. This is fairly straightforward but it doesn't always work, especially if the site you're scraping changes its format. Also some sites don't appreciate being used in this manner.
A better solution is to use a web service. Web services are sort of like web pages in that you access them with an "http://something" address. But instead of returning an HTML page they return the answer in a form that is easier for a computer program to understand, like XML or JSON. If the site you're querying provides a web service then you can write a program (like a price comparison server) that calls the service and gets the result.
Here's an example of a web service. When you click on this link, you will actually be calling a service from Google that translates the text "thank you" from one language to another, in this case English to French. Go ahead and click it; there's no code that runs in your browser or anything dangerous. Here's what I get:
You can see an example of code that uses web services in the downloadable examples from my upcoming book, Hello, Android. I wrote a program that prompts for some text, calls the service to translate it to another language, and then translates it back into your original language to see how it comes out. The examples are free; from the home page select the Code link, download the zip file, and open up the Translate project.
[ Read: More programming tips on Dev Connection ]