Ok, I've updated the code to catch only the section for www.sitename.com or http://www.sitename.com. Everything should work correctly now. So, say, if someone posts a link like this in a channel:> http://www.newegg.com/Product/Product.aspx?Item=079-0001-000T2The script should read the bit for http://www.newegg.com and returns its title.
The error occurred on account of the sub-path existed in the URL.