I noticed there was a question somewhat similar to mine, only with c#:link text. Let me explain: I'm very new to the whole web-services implementation and so I'm experiencing some difficulty understanding (especially due to the vague MediaWiki API manual).
I want to retrieve the entire page as a string in PHP (XML file) and then process it in PHP (I'm pretty sure there are other more sophisticated ways to parse XML files but whatever): Main Page wikipedia.
Ben yapıyorum denedim $fp = fopen($url,'r');
. Bu çıkışlar: HTTP request failed! HTTP/1.0 400 Bad Request
. API kendisine bağlamak için bir anahtar gerektirmez.
Eğer API bağlanmak ve bir dize olarak sayfayı nasıl ayrıntılı olarak anlatabilir misiniz?
EDIT:
The URL is $url='http://en.wikipedia.org/w/api.php?action=query&prop=revisions&rvprop=content&format=xml&redirects&titles=Main Page';
. I simply want to read the entire content of the file into a string to use it.