Wikipedia XML -> PHP?

Discussion in 'XML' started by Cain, Sep 8, 2006.

  1. Cain

    Cain Guest

    Cain, Sep 8, 2006
    #1
    1. Advertising

  2. >>>>> "Cain" <> (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 <>
    URL: http://www.cs.uu.nl/~piet [PGP 8DAE142BE17999C4]
    Private email:
     
    Piet van Oostrum, Sep 11, 2006
    #2
    1. Advertising

  3. Cain

    IchBin Guest

    Piet van Oostrum wrote:
    >>>>>> "Cain" <> (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.

    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-)
     
    IchBin, Sep 11, 2006
    #3
  4. Cain

    IchBin Guest

    Piet van Oostrum wrote:
    >>>>>> "Cain" <> (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.


    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-)
     
    IchBin, Sep 11, 2006
    #4
  5. Cain

    Cain Guest


    > 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/Using_Eclipse_Wikipedia_Editor:Download_a_Wikipedia_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.
     
    Cain, Sep 12, 2006
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. T.J.
    Replies:
    7
    Views:
    10,678
    Andy Dingley
    Apr 18, 2005
  2. Steve Lackey

    XML Wiki schemas (like WikiPedia)?

    Steve Lackey, Feb 11, 2004, in forum: XML
    Replies:
    0
    Views:
    417
    Steve Lackey
    Feb 11, 2004
  3. Claudio Grondi
    Replies:
    3
    Views:
    451
    Claudio Grondi
    Mar 22, 2005
  4. Rajive Narain
    Replies:
    0
    Views:
    2,070
    Rajive Narain
    Sep 18, 2009
  5. Wikipedia XML Dump

    , Jan 28, 2014, in forum: Python
    Replies:
    6
    Views:
    80
    Rustom Mody
    Jan 29, 2014
Loading...

Share This Page