function strip_returns ($text) { $subquotes = ereg_replace("'", "'", stripslashes($text)); return ereg_replace("(\r\n|\n|\r)", " ", $subquotes); } header("Content-type: application/x-javascript"); $str = ""; if(isset($_GET['rssurl']) && $_GET['rssurl'] != "") { $url = $_GET['rssurl']; } else { echo "document.write('Error, no RSS file passed to script.')"; exit(); } if(isset($_GET['limit']) && $_GET['limit'] != "") { $limit = $_GET['limit']; } else { $limit = 100; } require_once('lastRSS.php'); $rss = new lastRSS; if ($rs = $rss->get($url)) { } else { die ('document.write(\'Error: RSS file not found...\')'); } $str = "
$desc
"; if(--$limit < 1) {break;} } $str .= "