Daily Archives: October 28, 2007

My Blog Is Now A PageRank 5 Blog

Just noticed that my pagerank went up from 4 to 5. This has been achieved after 100+ blogs and 1.5yrs, 16,500+ visits. This month on, I have been averaging 100 visists/day.

I wonder if it’s possible to move to a pagerank of 6 and how long it would take if I were ever to reach there! But then who knows? With recent Google’s algorithm changes, some of the sites got their pagerank reduced. So, instead of reaching to 6, I may go down as well in the future! But for now, this is an enjoying moment!

Leave a comment

Filed under pagerank

LWP::UserAgent And Fetching UTF8 encoded XML (RSS/Atom Feeds)

LWP::UserAgent is supposed to be smart enough to parse the html headers (by default) and figure out the encoding. However, some of the xml responses out there don’t pass the right header information. Instead, they rely on the encoding attribute of the xml. For example

<?xml version="1.0" encoding="utf-8"?>

It could be utf-8 or some other encoding. So, one way to deal with this is using the following code

my $content = $response->content;
my $encoding = 'utf8'; # assume this is the default
if($content =~ /encoding="([^"]+)"/) {
$encoding = $1;
$content = $response->decoded_content((charset => $encoding));

That’s pretty much it.

Leave a comment

Filed under Tech - Tips