You just need to make a request http://tinyurl.com/api-create.php?url={url} , replacing {url} with the desired URL and read the contents of the page.
Here is an example:
public string ShortUrl(string url) { WebRequest request = WebRequest.Create(string.Format("http://tinyurl.com/api-create.php?url={0}", url)); Stream stream = request.GetResponse().GetResponseStream(); StreamReader reader = new StreamReader(stream); return reader.ReadLine(); }
source share