I am scraping data from I want to scrape three search engines. In My queries_controller I will have a function search that calls $this->Query->find('$query')
. My Model will hand this onto my own Database whose read()
funcion will call three functions, searchGoogle($query)
, searchYahoo($query)
and searchBing($query)
. The return values will be standartized by some helper functions defined within the Database and then be added onto the array that read()
returns. My model will simply pass this information onto the controller which will display it in a view. At the same time the controller will write into a MySQL Database all results of my query with an extra model whose write() function it will call.
Is it right that all functionality will be in the database or should the database return the rough content and leave it to the model to standartize it? Woud my model have another model write it to a database or would it be the controller? would I have helpers in the database to do the standartizing and is there something like extends for functions so they all have the same return array? Can I define what an array has to have that my search functions use?