Script to search prices on various websites

Asked

Viewed 218 times

1

As the title already says, I need to develop a site that searches product prices on certain sites. The idea is like Trivago, zoom, Buscapé, etc..

But I have no idea how to start this. I have read in a forum that it is necessary to create something that reads the pages of these sites and return a XML. But how can I do that? I just need a north to get started.

  • 4

    Its north is: web scraping.

  • Show. Thanks man!

1 answer

1


Diego your question is too wide, but to give you a basis.

How To Do This?

basically there are several classes ready PHP that facilitate and much this process, look on the internet for web scraping, web crawlers, spider bot.

What do they do?

with these powerful classes you can call a function by passing the site and the id of the element that Voce wants to copy, for example:

$temperatura_atual = copiar_texto('www.google.com/site/previsao_tempo/sp/mooca/hoje', 'id_elemento_com_texto_da_provisao');

Easy, no? and now with this variable with the value, just save in the database. There is enough video on the internet.

Some libraries that do this kind of service:

https://stackoverflow.com/questions/4842371/what-php-web-crawler-libraries-are-available

Browser other questions tagged

You are not signed in. Login or sign up in order to post.