tu prueba esto
Código PHP:
Ver original$url = 'http://en.wikipedia.org/w/api.php?action=query&list=search&format=xml&srsearch=messi';
//$userAgent = $_SERVER['HTTP_USER_AGENT'];
$header[] = "Accept: application/xml";
$header[] = "Accept-Encoding: gzip";
//curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
//$response = curl_exec($ch);
me da la respuesta esto: Scripts should use an informative User-Agent string with contact information, or they may be IP-blocked without notice.
mira la documenetacion de api