Posted on: 08/27/05 02:51am
By: Mikez
Posted on: 10/05/05 04:03pm
By: yankidank
<table align="center" border="0" width="102%"> <tr valign="top" align="center"> <td width="30%"><div id="table_full"> <div id="table_head"> <div id="table_head"><a href="http://www.yankidank.com" >Yankidank</a></div> <div id="table_time"> Video Game News </div> <div align="left"> <div id="table_links"> <script src="http://www.feedonsite.com/showfeed.php?f=P4h2bmv2f5Q6X7t2"></script> </div> </div> </div> </div></td> <td width="30%"><div id="table_full"> <div id="table_head"> <div id="table_head"><a href="http://news.yahoo.com/i/869" >Yahoo Games </a></div> <div id="table_time"> Game and Tech News </div> <div align="left"> <div id="table_links"> <script src="http://www.feedonsite.com/showfeed.php?f=c3BpWrS4q0Jty7T1"></script> </div> </div> </div> </div></td> <td width="30%"><div id="table_full"> <div id="table_head"> <div id="table_head"><a href="http://www.amazon.com/exec/obidos/redirect?tag=gp04-20&path=tg/browse/-/468642" >Amazon</a></div> <div id="table_time"> Top Video Game Sales </div> <div align="left"> <div id="table_links"> <script src="http://www.feedonsite.com/showfeed.php?f=n8D3cjD8o0s4b5br"></div></script> </div> </div> </div> </div></td> </tr> <tr valign="top" align="center"> <td><div id="table_full"> <div id="table_head"> <div id="table_head"><a href="http://gametrailers.com/" >GameTrailers</a></div> <div id="table_time"> Game Video Trailers</div> <div align="left"> <div id="table_links"> <script src="http://www.feedonsite.com/showfeed.php?f=i5r0Y2G2B4c0o0ef"></script> </div> </div> </div> </div></td> <td><div id="table_full"> <div id="table_head"> <div id="table_head"><a href="http://www.pressthebuttons.com/" >Press The Buttons </a></div> <div id="table_time"> Game Blog </div> <div align="left"> <div id="table_links"> <script src="http://www.feedonsite.com/showfeed.php?f=G0u3z0EpE6p5UmSd"></script> </div> </div> </div> </div></td> <td><div id="table_full"> <div id="table_head"> <div id="table_head"><a href="http://www.digg.com" >Digg</a></div> <div id="table_time"> Tech News </div> <div align="left"> <div id="table_links"> <script src="http://www.feedonsite.com/showfeed.php?f=a4N3V8Z2s8Z8k7"></script> </div> </div> </div> </div></td> </tr> </table>
Posted on: 10/06/05 02:02am
By: beewee
$insideitem = false; $tag = ""; $title = ""; $description = ""; $link = ""; $locations = array('YOUR-FEED-URL'); srand((float) microtime() * 10000000); // seed the random gen $random_key = array_rand($locations); function startElement($parser, $name, $attrs) { global $insideitem, $tag, $title, $description, $link; if ($insideitem) { $tag = $name; } elseif ($name == "ITEM") { $insideitem = true; } } function endElement($parser, $name) { global $insideitem, $tag, $title, $description, $link; if ($name == "ITEM") { printf("<div><a href='%s'>%s</a><br>", trim($link),htmlspecialchars(trim($title))); printf("%s</div>",htmlspecialchars(trim($description))); $title = ""; $description = ""; $link = ""; $insideitem = false; } } function characterData($parser, $data) { global $insideitem, $tag, $title, $description, $link; if ($insideitem) { switch ($tag) { case "TITLE": $title .= $data; break; case "DESCRIPTION": $description .= $data; break; case "LINK": $link .= $data; break; } } } $xml_parser = xml_parser_create(); xml_set_element_handler($xml_parser, "startElement", "endElement"); xml_set_character_data_handler($xml_parser, "characterData"); $fp = fopen($locations[$random_key], 'r') or die("Error reading RSS data."); while ($data = fread($fp, 4096)) xml_parse($xml_parser, $data, feof($fp)) or die(sprintf("XML error: %s at line %d", xml_error_string(xml_get_error_code($xml_parser)), xml_get_current_line_number($xml_parser))); fclose($fp); xml_parser_free($xml_parser);