I need a script to do some data scraping, something that will be used on a regular basis.
For a given search phrase e.g. “cat”, I need the urls for each item in
a) the search results pages
b) the ads.
User Input would be
1) search phrase
2) number of search pages or results to find the urls for
3) include ads display url or not.
Script should be in PHP, should not use a database.
Results should be the list of URLs found in plain text, in two textAreas.
EXAMPLE:
search for “cat” returns:
SEARCH
en.wikipedia.org/wiki/Cat
www.cat.com
icanhascheezburger.com
…
ADS
www.PetSmartCharities.org
northeastanimalshelter.org
AnythingPaintedOnCanvas.com
….