magpie

Latest

  • How to put WoW Insider on your PHP enabled website

    by 
    Adam Holisky
    Adam Holisky
    03.28.2008

    In an ongoing series of articles we'll show you how to put WoW Insider on your own blog, guild website, personal website, or even on your computer's desktop. For a complete list of the software that's covered, check out our guide's index.About PHP and RSS PHP is a very fun programming language. Just like World of Warcraft, it is easy to learn, and difficult to master. The idea behind PHP is that you enter a script, located within your webpage, and the server processes the script as it send the webpage to your visitor's web browser. PHP and things like it literally power the web – everything from WoW Insider, to Google, to Amazon. For more information on PHP, I highly recommend O'Reilly's book Learning PHP. How to get syndicate WoW Insider using Magpie RSS The easiest RSS syndication addon for PHP I've found is Magpie RSS. It's quite simple to use, and can easily integrate itself into existing page architecture. A sample Magpie script that would syndicate WoW Insider would look like this: require_once 'rss_fetch.inc'; $url = ' http://wow.joystiq.com/rss.xml; $rss = fetch_rss($url); echo "Site: ", $rss->channel['title'], "<br>"; foreach ($rss->items as $item ) { $title = $item[title]; $url = $item[link]; echo "<a href=$url>$title</a></li><br>"; } Of course, the above is just a rough template and doesn't include any formatting or bulleting or anything like that. Where other sites and tools listed above will provide you with lots of bells and whistles off the bat, PHP is bare bones – you have to make everything from scratch. Luckily there's a lot of great information out there and most of the work has already been done. However, that work is beyond the scope of this guide.