Blog url is appended to all anchor tags on the wordpress blog hosted on different ser

If my blog url is http://www.example.com/blog and it is wordpress blog hosted on different server then I have added this code to my sidebar in a php code widget:

<?php
// Your twitter username.
$username = “example”;
// Prefix - some text you want displayed before your latest tweet.
// (HTML is OK, but be sure to escape quotes with backslashes: for example href=\“link.html\”)
$prefix = “”;
// Suffix - some text you want display after your latest tweet. (Same rules as the prefix.)
$suffix = “”;
$feed = “http://search.twitter.com/search.atom?q=from:” . $username . “&rpp=1”;
function parse_feed($feed) {
$stepOne = explode(“<content type=\“html\”>”, $feed);
$stepTwo = explode(“</content>”, $stepOne[1]);
$tweet = $stepTwo[0];
$tweet = str_replace(“<”, “<”, $tweet);
$tweet = str_replace(“>”, “>”, $tweet);
return $tweet;
}
$twitterFeed = file_get_contents($feed);
echo parse_feed($twitterFeed);

<a href=“http://www.twitter.com/example” title=“Follow me on Twitter”><strong>Follow me on Twitter</strong></a>

Now what happens is when the tweet is displayed, instead of showing the http://twitter.com/twitter handle for eg. http://twitter.com/wordpress it shows like this:

http://www.example.com/blog/http://twitter.com/wordpress which is wrong. Please if anybody knows whats going wrong, I need some help.

Thanks