Using Wikipedia API link to get some basic informations about some world known characters.
Example : (About Richard Maibaum)
This would show as following

Now my question I’d like to parse the xml to get such basic informations between <search></search> to show it.
here is the code i’m willing to use if it right ~ thanks to ccKep ~
<?PHP
ini_set("user_agent","Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1");
$url = "http://en.wikipedia.org/w/api.php?format=xml&action=query&list=search&srsearch=Richard Maibaum&srlimit=1";
$xml = simplexml_load_file($url);
$extracts = $xml->xpath("/api/query/search");
echo $extracts["0"];
?>
But it failed and gives blank output
So any help ~ thanks
I am not sure what is your problem, but you can get your search results like this.