AJAX Call to Google URL Shortener API
Use the Google URL Shortener API to convert a regular URL to a tiny URL. The API service is free and you can obtain an API key
here. This example sends a long URL to the API via an AJAX call and returns a response object. The tiny URL is the id of the returned object.