473,386 Members | 1,652 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Wikipedia XML -> PHP?

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.
Sep 7 '06 #1
4 1436
>>>>"Cain" <Ca*******@243K4ooko342o.net(C) wrote:
>CHow would I get this Wikipedia XML:
Chttp://en.wikipedia.org/wiki/Special...lastair_Ralphs into a PHP
Cvariable (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 <pi**@cs.uu.nl>
URL: http://www.cs.uu.nl/~piet [PGP 8DAE142BE17999C4]
Private email: pi**@vanoostrum.org
Sep 11 '06 #2
Piet van Oostrum wrote:
>>>>>"Cain" <Ca*******@243K4ooko342o.net(C) wrote:
>CHow would I get this Wikipedia XML:
Chttp://en.wikipedia.org/wiki/Special...lastair_Ralphs into a PHP
Cvariable (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-)
Sep 11 '06 #3
Piet van Oostrum wrote:
>>>>>"Cain" <Ca*******@243K4ooko342o.net(C) wrote:
>CHow would I get this Wikipedia XML:
Chttp://en.wikipedia.org/wiki/Special...lastair_Ralphs into a PHP
Cvariable (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-)
Sep 11 '06 #4
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.
Sep 12 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Claudio Grondi | last post by:
Is there an already available script/tool able to extract records and generate proper HTML code out of the data stored in the Wikipedia SQL data base? e.g. converting all occurences of ] to <a...
4
by: Claudio Grondi | last post by:
I need to unpack on a Windows 2000 machine some Wikipedia media .tar archives which are compressed with TAR 1.14 (support for long file names and maybe some other features) . It seems, that...
24
by: Luis M. González | last post by:
For those interested in the simplest, easiest and most pythonic web framework out there, there's a new page in Wikipedia: http://en.wikipedia.org/wiki/Karrigell
9
by: AES | last post by:
I fairly often make PDF copies of web pages or sites by copying the web page link from the web page itself and pasting it into the Acrobat 7.0 Standard "Create PDF From Web Page" command. (Not...
7
by: Pitaridis Aristotelis | last post by:
There is a free encyclopedia called wikipedia (http://wikimediafoundation.org/). Does anyone knows how to use it in order to get various articles for diplaying them in my application?
1
by: soeren.auer | last post by:
Hi all, we thought it could be interesting to experiment with equipping Wikipedia with some AJAX features. Result is a user interface for Wikipedia, which is largely based on AJAX, thus enabling...
7
by: Jorge Vargas | last post by:
Hi I just hit this page in wikipedia BDFL and it redirected me to Guido's wikipedia entry now without causing any troubles (read flamewar) shouldn't a) that page have an explanation of what...
3
by: shahargs | last post by:
Hi, I'm trying to get wikipedia page source with urllib2: usock = urllib2.urlopen("http://en.wikipedia.org/wiki/ Albert_Einstein") data = usock.read(); usock.close(); return data I got...
2
by: John Nagle | last post by:
For some reason, Python's parser for "robots.txt" files doesn't like Wikipedia's "robots.txt" file: False The Wikipedia robots.txt file passes robots.txt validation, and it doesn't disallow...
15
by: Andreas Prilop | last post by:
If you have a browser that supports user stylesheets (like Firefox), then you can write html, body, #globalWrapper { font-size: 100% !important } into your own stylesheet (e.g....
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.