You are here: Re: Wikipedia XML -> PHP? « PHP Programming Language « IT news, forums, messages
Re: Wikipedia XML -> PHP?

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация