#!/usr/bin/perl # Provides a feed to a Xanga journal, correcting Xanga's RSS error. # By David B. Nagle, Version 0.1 # Add to your favorite rss reader as # http://www.example.com/cgi-bin/xanga.cgi?friend=XANGANAME use lib qw(/home/wersh/perl/); use warnings; use strict; use CGI; use WWW::Mechanize; my $cgi = CGI->new(); my $form = $cgi->Vars; my $agent = WWW::Mechanize->new(); $agent->get('http://xanga.com/rss.aspx?user='.$form->{friend}); my $content = $agent->content(); $content =~ s/<\/channel>//s; $content =~ s/(<\/rss>)/<\/channel>$1/s; print "Content-type: text/plain\n\n"; print $content;