Coding Ducks

Wednesday, November 09, 2005

Xanga and RSS Feed w/ google reader.

Xanga is a famous blog (*diary*) community amongs youngster.
Many of you may want to use rss feed reader to keep track your friends' daily life.

Recently, xanga finally tidy up its rss xml and rss feeder will feel happy with it.
The URL of the rss feed is
The rss xml is intended to encode in utf-8, so your feeder may not display the entries other than utf-8. For example, we write chinese entries with big5 encoding in xanga, the google reader can feed the entries but cannot display the chinese correctly.

Thus, we decided to make a wrapper for the google reader to feed the big5 entries.
We choose to use PHP to implement the wrapper. It can simply does a big5-to-utf8 transformation in the xml.

One funny thing is that we discovered that google reader like to recognize the feed url file name. For instance, if you feed a rss1.xml, it is wrong. If you feed it a rss.xml, you can display it! so *rss.* is the keyword for google reader.

The php script work-flow:
1. fetch rss feed from xanga site
2. parse the xml into struct and find out the tag data
3. transform data from big5 to utf8
4. pack the data back to xml and return to browser

The result is cool, the google reader can display the chinese correctly!
The speed of this php script is rather slow because the transformation take
unreasonable long time. If you are using PHP5, use iconv may be a better choice.
Tell us if you tried.

1) Php script :

2) Chinese class:
(this library is downloaded from the internet!)

Useful links:
1) Feed Validator:
2) PHP reference site:
3) Google Reader:


  • Hi there, I was simply cruising the net searching for information on the dangers of the pharmaceutical industry. Your site caught my interest when I was looking for beverage, so I had to take a peak. Even though I am unclear (right now) if your site is exactly what I am looking for, I'm still glad I stopped by. Great post! Thank you for your site!

    By Blogger JVCResults, at 1:45 AM  

  • Hi, senz,
    Good blog. You’ve put lots of thought in here. It looks like we have an interest in common. If you are interested, go see my ipod related site. It’s totally focussed on the Zen Micro at the moment and is still growing. You may still find something of interest. I recently added a MP3 link page - you would be welcome to post a link to your site there


    By Blogger Small Business Marketing, at 8:10 AM  

  • You have obviously put lots of work into this blog. it's obvious that I need to put in more effort on my own site. If you are interested, go see my ipod related site. Maybe you could leave a comment for me there? Or even post your link. It helps to know that people are visiting once in a while :)


    By Blogger Online marketing for small businesses, at 9:49 AM  

  • Hi, senz,
    Good blog. You’ve put lots of thought in here. At the moment I am looking for profiatble ideas. At the moment I have put up a site to sell Creative's Zen Micro. Conversion is not good though. If you are interested, go see my mp3players related site. It’s totally focussed on the Zen Micro at the moment and is still growing. You may still find something of interest. I recently added a MP3 link page - you would be welcome to post a link to your site there


    By Blogger Small Business Marketing, at 9:10 AM  

  • hi senz,
    Cool blog. You have put a lot of effort in here. You certainly make me feel a bit humble :)
    I have a mp3 players related site. Please take a look and feel free to post a link to your blog on the links page.
    Come and check it out if you get time :-)


    By Blogger Online marketing for small businesses, at 4:21 AM  

  • Make no mistake: Our mission at Tip Top Equities is to sift through the thousands of underperforming companies out there to find the golden needle in the haystack. A stock worthy of your investment. A stock with the potential for big returns. More often than not, the stocks we profile show a significant increase in stock price, sometimes in days, not months or years. We have come across what we feel is one of those rare deals that the public has not heard about yet. Read on to find out more.

    Nano Superlattice Technology Inc. (OTCBB Symbol: NSLT) is a nanotechnology company engaged in the coating of tools and components with nano structured PVD coatings for high-tech industries.

    Nano utilizes Arc Bond Sputtering and Superlattice technology to apply multi-layers of super-hard elemental coatings on an array of precision products to achieve a variety of physical properties. The application of the coating on industrial products is designed to change their physical properties, improving a product's durability, resistance, chemical and physical characteristics as well as performance. Nano's super-hard alloy coating materials were especially developed for printed circuit board drills in response to special market requirements

    The cutting of circuit boards causes severe wear on the cutting edge of drills and routers. With the increased miniaturization of personal electronics devices the dimensions of holes and cut aways are currently less than 0.2 mm. Nano coats tools with an ultra thin coating (only a few nanometers in thickness) of nitrides which can have a hardness of up to half that of diamond. This has proven to increase tool life by almost ten times. Nano plans to continue research and development into these techniques due to the vast application range for this type of nanotechnology

    We believe that Nano is a company on the move. With today�s steady move towards miniaturization we feel that Nano is a company with the right product at the right time. It is our opinion that an investment in Nano will produce great returns for our readers.

    Online Stock trading, in the New York Stock Exchange, and Toronto Stock Exchange, or any other stock market requires many hours of stock research. Always consult a stock broker for stock prices of penny stocks, and always seek proper free stock advice, as well as read a stock chart. This is not encouragement to buy stock, but merely a possible hot stock pick. Get a live stock market quote, before making a stock investment or participating in the stock market game or buying or selling a stock option.

    By Blogger lennykline77556180, at 4:29 AM  

  • I read over your blog, and i found it inquisitive, you may find My Blog interesting. My blog is just about my day to day life, as a park ranger. So please Click Here To Read My Blog

    By Blogger meganericks8039, at 8:25 PM  

  • While you read this, YOU start to BECOME aware of your surroundings, CERTIAN things that you were not aware of such as the temperature of the room, and sounds may make YOU realize you WANT a real college degree.

    Call this number now, (413) 208-3069

    Get an unexplained feeling of joy, Make it last longer by getting your COLLEGE DEGREE. Just as sure as the sun is coming up tomorrow, these College Degree's come complete with transcripts, and are VERIFIABLE.

    You know THAT Corporate America takes advantage of loopholes in the system. ITS now YOUR turn to take advantage of this specific opportunity, Take a second, Get a BETTER FEELING of joy and a better future BY CALLING this number 24 hours a day.
    (413) 208-3069

    By Blogger cristaft19475299, at 10:47 AM  

  • Thanks for the info. My site ( ) and interests are more involved in music mp3, but I still enjoyed what you had to say. Thanks!

    By Blogger diskfaktory, at 1:57 AM  

Post a Comment

<< Home