Fetching a random article from Wikipedia

Using the CURL class from my previous post, its very easy to fetch any webpage, a random article from Wikipedia for instance.

Just use the following script and you are done.

<?php
include(”myCURL.class.php”);
$curl = new myCURL();
echo $curl->get(”http://en.wikipedia.org/wiki/Special:Random”);
?>

You may then $curl->post this to some web log or just email it some email id and host your own automated posting.
Similarly you can also run your own “Word of the Day” service by fetching a random word from any dictionary website and emailing it to a list of people.

Bookmark this post: technorati Fetching a random article from Wikipedia delicious Fetching a random article from Wikipedia stumbleupon Fetching a random article from Wikipedia digg Fetching a random article from Wikipedia facebook Fetching a random article from Wikipedia yahoo Fetching a random article from Wikipedia google Fetching a random article from Wikipedia magnolia Fetching a random article from Wikipedia reddit Fetching a random article from Wikipedia windowslive Fetching a random article from Wikipedia

Tags: , ,

Related posts

0 Responses to “Fetching a random article from Wikipedia”


  1. No Comments

Leave a Reply




/kapil/blog is Digg proof thanks to caching by WP Super Cache!