All pastes #514932 Raw Edit

BILL

public php v1 · immutable
#514932 ·published 2007-05-28 00:04 UTC
rendered paste body
<?php// Get the XML data from Feedburner$xml = simplexml_load_file('http://www.sportsnet.ca/rss/homepage.xml');function word_wrap($text, $chars) {        // Define the characters to display per row        $chars = "10";        $text = wordwrap($text, $chars, "<br>" , true);        return $text;    }// Parse each item in the RSS feedforeach  ($xml->channel[0]->item as $item)    if($item)     {        $title = strip_tags($item->title);        $description = strip_tags($item->description);               $text = $description;$img = imagecreatefromgif('cisco.gif');      $color = imagecolorallocate($img, 0x00, 0x66, 0xCC); $newtext = wordwrap($text, 9, "<br>", true);imagestring($img, 1, 1, 2, $title, $color);imagestring($img, 1 , 1, 18 ,$text, $color);       echo "".$title;       echo "</title> <br>\n";       echo "$newtext";     imagegif($img, 'feedburner-readers.gif');exit;   }?>