Xanga RSS

July 19th, 2004 by Brad Froehle

I always had a problem with Xanga RSS not working in NetNewsWire.

So I hacked up a solution in the form of a php file:

<pre><?
$f = escapeshellcmd($_GET["q"]);
$g = shell_exec('curl -s http://www.xanga.com/rss.aspx?user='
. $f . ' | sed -e "s/<rss version="0.91">/'
. '<rdf:RDF xmlns:rdf="http://www.w3.org/1999/'
. '02/22-rdf-syntax-ns#" xmlns="'
. 'http://my.netscape.com/rdf/simple/0.9/">/"'
. ' | sed -e "s/</rss>/</rdf:RDF>/"');
echo $g;
?></pre>

And then I just call the script by subscribing to http://path.to/script/?q=username. It’s ugly, but functional.

A copy is also available for download.

9 Responses to “Xanga RSS”

  1. Ryan wrote on 07/20/04 at 4:52 pm :

    Ah! Awesome! Thanks Brad!

  2. Simon wrote on 08/1/04 at 11:36 pm :

    Or, without the shell,

    < ?php
    echo str_replace(array('‘, ‘‘), array(‘‘, ‘‘), file_get_contents(“http://www.xanga.com/rss.aspx?user=”.urlencode($_REQUEST["q"])));
    ?>

  3. Simon wrote on 08/1/04 at 11:36 pm :

    Oops, I messed up the formatting on my previous post.

    Try this:

    >?php
    echo str_replace(array(‘>rss version=”0.91″<’, ‘>/rss<’), array(‘>rdf:RDF xmlns:rdf=”http://www.w3.org/1999/02/22-rdf-syntax-ns#” xmlns=”http://my.netscape.com/rdf/simple/0.9/”<’, ‘>/rdf:RDF<’), file_get_contents(“http://www.xanga.com/rss.aspx?user=”.urlencode($_REQUEST["q"])));
    ?<

  4. Simon wrote on 08/1/04 at 11:37 pm :

    Blah. Messed up the tags. I’m retarded. Once more:

    <?php
    echo str_replace(array(‘<rss version=”0.91″>’, ‘</rss>’), array(‘<rdf:RDF xmlns:rdf=”http://www.w3.org/1999/02/22-rdf-syntax-ns#” xmlns=”http://my.netscape.com/rdf/simple/0.9/”>’, ‘</rdf:RDF>’), file_get_contents(“http://www.xanga.com/rss.aspx?user=”.urlencode($_REQUEST["q"])));
    ?>

  5. shelbi wrote on 08/24/04 at 7:10 pm :

    kool w/e its all ok

  6. Michael Greene wrote on 10/19/04 at 2:34 pm :

    I wrote a little PHP script at http://www.ephemeraleuphoria.com/xanga/ that converts the Xanga feed a little more, just so you know… I should probably add your additions too.

  7. mm wrote on 11/24/04 at 5:13 pm :

    okay, here is a small program that takes advantage of the RSS xanga feed. Not sure how useful it is, but for what its worth, here is the link in case anybody is interested:

    http://www.geocities.com/xangastalker/

  8. Ariah Fine wrote on 10/6/05 at 4:16 pm :

    I’m looking for RSS for the COMMENTS section, anyone!?!?!

  9. Ariah Fine wrote on 01/8/06 at 11:41 pm :

    Xanga RSS