Here’s a link to get the intro for an article on Wikipedia about Goldman Sachs.
http://en.wikipedia.org/w/api.php?action=query&prop=extracts&titles=Goldman_Sachs&format=json&exintro=1
I have a two part question.
- How can I use PHP to run these kinds of API calls on the server side? I want to be able to hook up to the Wikipedia API for data on subjects, companies, people without using links
- How can I parse the JSON or XML so the output will be strictly text?
Any help would be greatly appreciated.
I believe cURL is the usual option. The manual has examples. You can also use
fopen.json_decode