Posted by Piet van Oostrum on 09/11/06 19:33
>>>>> "Cain" <Cain34345@243K4ooko342o.net> (C) wrote:
>C> How would I get this Wikipedia XML:
>C> http://en.wikipedia.org/wiki/Special:Export/Alastair_Ralphs into a PHP
>C> variable (without copy and pasting it manually)?
You mean the contents of the document that the URL points to?
$url = "http://en.wikipedia.org/wiki/Special:Export/Alastair_Ralphs";
$handle = fopen($url, "r");
$contents = stream_get_contents($handle);
fclose($handle);
or use file_get_contents.
--
Piet van Oostrum <piet@cs.uu.nl>
URL: http://www.cs.uu.nl/~piet [PGP 8DAE142BE17999C4]
Private email: piet@vanoostrum.org
Navigation:
[Reply to this message]
|