/* *********************************************************************************************************** NOTICE: This code is provided as is, and you use it at your own risk. By using this code, you acknowledge that Stuart Morris or shehaal.com cannot be held responsible for any problems or issues that may be caused as a direct or indirect result of its use. Feel free to use, modify, or redistribute this as you wish. There is some css classes used here, to allow you to format the tables. These are: .GameTitle .GameDate .Gamertag The first two allow you to format the game title/link and the date it was played. Gamertag is provided mainly to allow you to format the column width, eg: .Gamertag { width: 200px; } All gamertags and column titles use the (table header) tag. If you publish your Bungie stats xml file through a service such as FeedBurner, this script still works as is - just put your new xml file location into the line below $rss = fetch_rss(...); NB: THIS SCRIPT REQUIRES MAGPIE RSS TO WORK!! YOU CAN DOWNLOAD THIS FOR FREE FROM http://magpierss.sourceforge.net/ *********************************************************************************************************** */ image; $h2icon ='

'; if ($rss) { // Split the array to show first x number of games (eg. 3 to 7 is a good number) // First number should always be zero $items = array_slice($rss->items, 0, 5); // Cycle through each item and echo foreach ($items as $item ) { echo '', $desc); $desc = str_replace('Standing, Score, Kills, Deaths, Assists', '', $desc); $deschead = preg_replace('~()(.+)(Assists)(.+)~', '$1$2$3', $desc); echo $deschead; // Create and print game stats section of table $desc = preg_replace('~()(.+)(Assists)~', '', $desc); $desc = str_replace(': ', '
'.$item['title'].'
'; $desc = $item['description']; // Create and print game header section of table $desc = str_replace('Game played', 'Game played', $desc); $desc = preg_replace('~GMT

.+

Gamertag: ~', 'GMT
GamertagPlaceScoreKillsDeathsAssists', $desc); $desc = str_replace(', ', '', $desc); $desc = str_replace('
', '
', $desc); $desc = substr_replace($desc, '', -8, 8); $desc = $desc.'

'; echo $desc; } } else { echo '

Error:

'.magpie_error().'

'; } // Restore original error reporting value @ini_restore('error_reporting'); ?>