Comparing results

I need to create a very simple comparison website that gives the user the ability to filter the results. Does anybody know if there are any code examples of this or where I can get help with doing this?

What that means?

Results of what?

It will get the prices of horse feed from a range of websites and then the user can then compare the price and chose to filter the results to show only feed with oats, barley etc. Then there will be options where to buy it from (similar to if you search Google shopping but much simpler).

At the moment I don’t have anything at all and thought that the best way would be to use a script (set to run every whoever often using crons) to get the product details then store the details in a database. This might not be the best way of doing it though

Step #1: Make sure the websites you plan to retrieve prices from actually ALLOW you to do this. Copyright. <bad accent>It’s the LAW. </bad accent> Just because a site is on google compare doesn’t mean they’ve given you permission.

Step #2: Most sites that DO allow you to do this specify their parameters for allowed data scraping/API pulls. Comply. (For example, Amazon allows you to access their pricing data through a developer API, but that API is throttled to certain refresh time windows and bandwidth size, etc)

Step 3: As you have correctly surmised, you will need to put these data pullers into cron-based scripts, and store data only for the allowed amount of time. (Another common requirement of data pulling API’s. Usually it’s something like 3 days.)

Thanks for the advice, all of the companies that we’ll be showing will either provide us with a feed or will allow us to take one from a third party

The main thing I wondered about though was is there any examples of this working or would it be just a simple case of using an database query to display the results for each person?

Doing the actual comparisons should (if you’ve got your data properly organized) be a simple SELECT query ORDERed by the price.

Thanks, that’s reassuring to know :slight_smile:

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.