Xanga Feed Converter 0.4
','- ',$xml);$xml = str_replace('','',$xml);// Don't know why Xanga would send this like this but not anymore$xml = str_replace(' ',' ', $xml);// Break the feed into
- components$items = explode('
- ', $xml);// Add a description element to the channel for validity$items[0] .= '
An RSS Feed of a Xanga.com Journal ';// Make the titles a lot coolerfor ($i=1; $i<6; $i++) { // grab the description part $description ="" strstr($items[$i], ''); // Get rid of any HTML $description = html_entity_decode($description); $description = strip_tags($description); // Extract the first 25 characters of that $extra = substr($description, 0, 25); // Separate the title from the rest $itempieces = explode('', $items[$i]); // Add a space plus the first 25 characters to the title $itempieces[0] = $itempieces[0] . ' ' . $extra . '...'; // Put the pieces of the item back together $items[$i] = implode('', $itempieces);}// Put the items back together$xml = implode('- ', $items);// Output the final RSS feedecho $xml;?>
0 Comments:
Post a Comment
<< Home