How do I use PHP to get the first paragraph of any article from Wikipedia through their MediaWiki API?
PHP
I am open to all suggestions. Most probably CUR
CUR
You can use the API as so:
http://en.wikipedia.org/w/api.php?action=parse&page=Stack_overflow&format=xml&prop=text§ion=0
This will return an xml file with structure:
Text you wanted goes here
Note the variables: page=Article_Title_Goes_Here format=xml prop=text
page=Article_Title_Goes_Here
format=xml
prop=text