• "; $title_allowable_tags = ""; if (isset($_GET['url'])) { $url = $_GET['url']; $urlparts = parse_url($url); if ($urlparts[path] == "") { $url .= "/"; } if ($fp = @fopen($url, "r")) { while (!feof($fp)) { $data .= fgets($fp, 128); } fclose($fp); } preg_match("%rss:channelTitle *\" *>(.+?)%is", $data, $channelTitleMatches); $channelTitle = htmlentities(strip_tags($channelTitleMatches[1],$allowable_tags)); //if no title can be found then lets just use the title of the page if ($channelTitle == "") { eregi("(.*)", $data, $channelTitleMatches); $channelTitle = $channelTitleMatches[1]; } preg_match("%rss:channelDescription *\" *>(.+?)%is", $data, $channelDescriptionMatches); $channelDescription = htmlentities(strip_tags($channelDescriptionMatches[1],$allowable_tags)); $channelLastBuildDate = date("l, F d, Y g:i:s A"); header("Content-Type: text/xml"); $output .= '' . "\n"; $output .= '' . "\n"; $output .= '' . "\n\n"; $output .= '' . "\n"; $output .= '' . "\n"; $output .= ' ' . $url . '' . "\n"; $output .= ' ' . htmlentities($channelTitle) . '' . "\n"; $output .= ' ' . htmlentities($channelDescription) . '' . "\n"; $output .= ' en-us' . "\n"; $itemLinkregexp = "%rss:itemLink *\" *>%is"; $match_count = preg_match_all($itemLinkregexp, $data, $itemLinks); $match_count = ($match_count > 25) ? 25 : $match_count; $itemTitleregexp = "%rss:itemTitle *\" *>(.+?)%is"; $match_count = preg_match_all($itemTitleregexp, $data, $itemTitles); $match_count = ($match_count > 25) ? 25 : $match_count; $itemDescregexp = "%rss:itemDescription *\" *>(.+?)%is"; $match_count = preg_match_all($itemDescregexp, $data, $itemDescriptions); $match_count = ($match_count > 25) ? 25 : $match_count; for ($i=0; $i< $match_count; $i++) { $itemLink = $itemLinks[1][$i]; $itemTmpDescription = trim($itemDescriptions[1][$i]); $itemTmpDescription = str_replace("

        ", "
        ", $itemTmpDescription); $itemTmpDescription = str_replace("

        ", "", $itemTmpDescription); $itemTmpDescription = str_replace("
        ", "
        ", $itemTmpDescription); $itemTmpDescription = str_replace("

        ", "
        ", $itemTmpDescription); $itemTmpDescription = str_replace("

        ", "", $itemTmpDescription); $itemTmpDescription = str_replace("
        ", "
        ", $itemTmpDescription); $itemDescription = strip_tags($itemTmpDescription,$allowable_tags); //use item title if provided, else generate from description $itemTmpTitle = trim($itemTitles[1][$i]); if ($itemTmpTitle != "") { $itemTitle = strip_tags($itemTmpTitle,$title_allowable_tags); } else { $itemTitle = substr(strip_tags(str_replace("
        ", " ", $itemDescription),$title_allowable_tags),0,47) . '...'; } $output .= ' ' . "\n"; $output .= ' ' . htmlentities($itemTitle) . '' . "\n"; if (strpos('a' . strtolower($itemLink),str_replace(strtolower($url),"http://www.","http://")) != 1) { $itemUrlLink = $url . $itemLink; } else { $itemUrlLink = $itemLink; } $output .= ' ' . htmlentities($itemUrlLink) . '' . "\n"; $output .= ' ' . htmlentities($itemDescription) . '' . "\n"; $output .= ' ' . "\n"; } $output .= '
        ' . "\n"; $output .= '
        ' . "\n"; echo $output; } else { ?> Sports Blogs :: makeRSS

        Make RSS Version

        This code base is originally the code used at http://voidstar.com/rssify.php with a few enhancements.

        To generate an RSS feed for your Blogger blog, all you need to do is follow the following steps:
        1. If you are using the <$BlogTitle$> tag in your template, in any other place besides <title><$BlogTitle$><title>, replace it with the following text:
          <span class="rss:channelTitle"><$BlogTitle$></span>
        2. If you are using the <$BlogDescription$> tag in your template, replace it with the following text:
          <span class="rss:channelDescription"><$BlogDescription$></span>
        3. If you are using the <$BlogItemTitle$> tag in your template, replace it with the following text:
          <span class="rss:itemTitle"><$BlogItemTitle$></span>
        4. Replace the <$BlogItemBody$> tag in your template with the following text:
          <span class="rss:itemDescription"><$BlogItemBody$></span>
        5. Finally, you'll need to replace your permalink tag set with a new one. In most templates, the following is usually the code for the permalink link:
          <a href="<$BlogItemArchiveFileName$>#<$BlogItemNumber$>"><$BlogItemDateTime$></a>
          Replace the above with the following:
          <span class="rss:itemLink"><a href="<$BlogItemArchiveFileName$>#<$BlogItemNumber$>"></span><$BlogItemDateTime$></a>
        6. Now you will need republish your site so that the new template will take affect. Also, after each post you make, you will need to republish your most current archive because the link to your article that is used is linked to your archive file.
        7. Now paste your URL into the form below and make sure what you get back looks like RSS.
        8. Now you can make a link to this file as: "http://rss.sportsblogs.org?url=http://www.your_web_page_url.com"
        9. Finally add a link to it on your web page, something like this:
          Syndicate This Site (XML)
          Powered by
          MakeRSS at sportsblogs.org


        Please enter the URL of your blog


        General Notes

        • The item text is put in the description element.
        • The first 40 characters of html stripped description are put in the title element.
        • All tags except <A> <B> <BR> <BLOCKQUOTE> <CENTER> <DD> <DL> <DT> <HR> <I> <IMG> <LI> <OL> <P> <PRE> <U> <UL> are stripped from the description.
        • A maximum of 25 items are included in the rss.
        • If you have any problems, send me an email
        • If you would like to take this script and run it on your own server, you can download the source here.