Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Wikipedia XML -> PHP?

Reply
Thread Tools

Wikipedia XML -> PHP?

 
 
Cain
Guest
Posts: n/a
 
      09-07-2006
How would I get this Wikipedia XML:
http://en.wikipedia.org/wiki/Special...lastair_Ralphs into a PHP
variable (without copy and pasting it manually)?

Thanks,

Cain.


 
Reply With Quote
 
 
 
 
Piet van Oostrum
Guest
Posts: n/a
 
      09-11-2006
>>>>> "Cain" <(E-Mail Removed)> (C) wrote:

>C> How would I get this Wikipedia XML:
>C> http://en.wikipedia.org/wiki/Special...lastair_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 <(E-Mail Removed)>
URL: http://www.cs.uu.nl/~piet [PGP 8DAE142BE17999C4]
Private email: http://www.velocityreviews.com/forums/(E-Mail Removed)
 
Reply With Quote
 
 
 
 
IchBin
Guest
Posts: n/a
 
      09-11-2006
Piet van Oostrum wrote:
>>>>>> "Cain" <(E-Mail Removed)> (C) wrote:

>
>> C> How would I get this Wikipedia XML:
>> C> http://en.wikipedia.org/wiki/Special...lastair_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.

This is not a solution that you maybe looking for but here goes. The
Eclipse IDE has a wikipedia Plugin that will pert much let you download
change and upload.. There is much more to to this plugin. I figured I
would let you be aware of it.

Naturally the Eclipse link is:
http://www.eclipse.org/downloads

The plugin link is here:
http://www.plog4u.org/index.php/Main_Page

--
Thanks in Advance...
IchBin, Pocono Lake, Pa, USA http://weconsultants.phpnet.us
'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
 
Reply With Quote
 
IchBin
Guest
Posts: n/a
 
      09-11-2006
Piet van Oostrum wrote:
>>>>>> "Cain" <(E-Mail Removed)> (C) wrote:

>
>> C> How would I get this Wikipedia XML:
>> C> http://en.wikipedia.org/wiki/Special...lastair_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.


This is not a solution that you maybe looking for but here goes. The
Eclipse IDE has a wikipedia Plugin that will pert much let you download
change and upload.. There is much more to to this plugin. I figured I
would let you be aware of it.

Naturally the Eclipse link is:
http://www.eclipse.org/downloads

The plugin link is here (Plog4U):
http://www.plog4u.org/index.php/Main_Page

--
Thanks in Advance...
IchBin, Pocono Lake, Pa, USA http://weconsultants.phpnet.us
'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
 
Reply With Quote
 
Cain
Guest
Posts: n/a
 
      09-12-2006

> The
> Eclipse IDE has a wikipedia Plugin that will pert much let you download
> change and upload..


Thanks for this although I've not got it working yet.

I'm following these steps from
http://www.plog4u.org/index.php/Usin...ipedia_Article

"Example: grabbing a wikibooks.org article
a.. create a new index.wp file under your projects /wpsrc directory
b.. write a Wiki link definition somewhere in the editor, for example:
[[Programming:HTML]]
c.. do a "right mouse" click on the link and select menu Open Wiki Link
d.. a new file with the corresponding *.wp filename should open.
e.. do a "right mouse" click on the file name in the Navigator View' and
select menu Wikipedia Download->Refresh Wikipedia from Web
f.. in the opening dialog box select WikibooksEN Download"

However I when I do the last step I don't get any URLs in the opening dialog
box.

Can you help?

Thanks,

Cain.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Firefox 1.5 Wikipedia search engine Chuck Firefox 12 12-02-2005 10:05 PM
external link symbol at wikipedia? T.J. HTML 7 04-18-2005 12:05 PM
Pseudocode in the wikipedia bearophileHUGS@lycos.com Python 8 04-02-2005 03:39 AM
Wikipedia - conversion of in SQL database stored data to HTML Claudio Grondi Python 3 03-22-2005 07:11 PM
XML Wiki schemas (like WikiPedia)? Steve Lackey XML 0 02-11-2004 07:33 PM



Advertisments