Wikipedia API Sorunu

0 Cevap php

Ben Vikipedi API kullanarak sorun var. Ben bu PHP komut dosyası kullanmak,

<?php
  $xmlDoc = new DOMDocument();
  $xmlDoc->load("http://en.wikipedia.org/w/api.php?action=query&prop=revisions&titles=New_York_Yankees&rvprop=content&format=xml");

  print $xmlDoc->saveXML();
?>

ve ben tarayıcıda aşağıdaki sonuç var. Neden?

Warning: DOMDocument::load(http://en.wikipedia.org/w/api.php?action=query&prop=revisions&titles=New_York_Yankees&rvprop=content&format=xml) [domdocument.load]: failed to open stream: HTTP request failed! HTTP/1.0 403 Forbidden in D:\Program Files\VertrigoServ\www\wiki\index.php on line 3

Warning: DOMDocument::load() [domdocument.load]: I/O warning : failed to load external entity "http://en.wikipedia.org/w/api.php?action=query&prop=revisions&titles=New_York_Yankees&rvprop=content&format=xml" in D:\Program Files\VertrigoServ\www\wiki\index.php on line 3

0 Cevap