Monthly Archives: October 2011

Display tweets from RSS with twitter style links

Based on an original post here:
http://www.farinspace.com/twitter-feed-website-integration/
but modified lisghtly to mimic Twitter.


\1@\2', $v);
	$v = preg_replace('/(^|\s)#(\w+)/', '\1#\2', $v);

	$v = preg_replace("#(^|[\n ])([\w]+?://[\w]+[^ \"\n\r\t<]*)#ise", "'\\1\\2'", $v);
	$v = preg_replace("#(^|[\n ])((www|ftp)\.[^ \"\t\n\r<]*)#ise", "'\\1\\2'", $v);
	$v = preg_replace("#(^|[\n ])([a-z0-9&\-_\.]+?)@([\w\-]+\.([\w\-\.]+\.)*[\w]+)#i", "\\1\\2@\\3", $v);

	return trim($v);
}

?>