I want a php function that will allow me to search wikipedia (using the wikipedia api) .
I want to pass to the function the search term as a string. ( I want to call it from existing php code)
The function will search wikipedia page titles
The function will return the matching results that has the highest word count
The text from wikipedia should be returned in wikitext format