Website Scraping Script Needed

Website Scraping Script Needed
Hi there,

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

http://corpora.informatik.uni-leipzig.de/

Now the function would give me the option to declare the language and a word and it would return all the data being shown in the resulting page (when having a look above).

To give you an example:

If the function would be called e.g. like that getInfo ($word, $language)

and I would pass on like that getInfo (“test”, “en”)

it would return an array about like that:
$data[“term”] = “test”;
$data[“numberOfOccurences”] = “60182”;
$data[“classOfFrequency”] = “8”;
$data[“example”] = “Ms. McNamara initially opposed the test because 50% of applicants flunked. (source: Wall Street Journal 1992)
The broad test seeks to uncover likely behavior with questions such as: “Would you agree that to be successful, luck is more important than hard work?” London House’s multipurpose test helped Wet Seal to select more motivated people. (source: Wall Street Journal 1992)
DEATH BENEFITS for the living face a tax test as products proliferate. (source: Wall Street Journal 1992)”;
$data[“cooccurences”][0] = “results”;
$data[“cooccurences”][1] = “Labs”;

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 *