This example shows how to get the Wikipedia content via the MediaWiki action API using PHP. The output data in JSONP format contains several information such as page id, page title and extract which are parsed and used to form a list which user can click to open the corresponding Wikipedia page. It also makes use of Special:Random to randomly bring user to a random page.
Similar idea but using jQuery can be found at https://github.com/lengieng/wikipedia-viewer-jquery
This example requires the following libraries:
Author: Lengieng Ing ([email protected])
This software is distributed under the MIT license. Please see the attached file called LICENSE.txt.