https://nikephang.blogspot.co.uk/2013/12/how-to-automatically-shrink-url-of.html