Monday, April 04, 2011 at 1:06 AM.

radio2Suite.utilities.getFavIconHtml

on getFavIconHtml (url) {
	<<Changes
		<<3/5/11; 5:58:53 PM by DW
			<<Give me a URL and I return HTML for its favicon. 
	local (ul);
	try {
		ul = string.urlsplit (url)}
	else {
		try {
			ul = string.urlsplit (url + "/x")}
		else {
			ul = {"", "", ""}}};
	return ("<a href=\"" + url + "\"><img class=\"icon\" src=\"http://www.google.com/s2/favicons?domain=" + ul [2] + "\" width=\"16\" height=\"16\" border=\"0\" alt=\"Click here to visit the site.\"></a>")};
bundle { //test code
	webbrowser.displaytext (getFavIconHtml ("http://twitter.com"))}



This listing is for code that runs in the OPML Editor environment. I created these listings because I wanted the search engines to index it, so that when I want to look up something in my codebase I don't have to use the much slower search functionality in my object database. Dave Winer.