Website Scraping Script

Website Scraping Script
Hi there,

I would need a script/function which would scrape the content of that page:

http://www.pauker.at

Now the function would give me the option to declare the language and a word and it would return all the translations being shown.

Like e.g. if I would hand on those 2 parameters to the function “test” “en” it would give all the translations on this page:

http://stockholm.pauker.at/pauker/DE_DE/EN/wb/?modus=&zufall=2803&suche=test&page=1

and the other 3 resulting pages:

http://stockholm.pauker.at/pauker/DE_DE/EN/wb/?modus=&zufall=3948&suche=test&page=2
http://stockholm.pauker.at/pauker/DE_DE/EN/wb/?modus=&zufall=3948&suche=test&page=3
http://stockholm.pauker.at/pauker/DE_DE/EN/wb/?modus=&zufall=3948&suche=test&page=4

The same for all other provided languages… like e.g. if I would pass on the the function “sv” and “fastighet” it would return all the translations for fastighet of this page:

http://stockholm.pauker.at/pauker/DE_DE/SE/wb/?modus=&zufall=6252&suche=fastighet&page=1#

Now all that data should be returned in a array like that (for swedish example above):

$translation[1][“german”] = “Grundstück”;
$translation[1][“sv”] = “fastighet”;
$translation[1][“category”] = “”;
$translation[1][“type”] = “Substantiv”;
$translation[1][“german”] = “Immobilie”;
$translation[1][“sv”] = “fastighet”;
$translation[1][“category”] = “”;
$translation[1][“type”] = “”;

and so on….

We would prefer if the function would be using cURL and is written in PHP.

Leave a Reply

Your email address will not be published. Required fields are marked *