URL shortening is a technique in which a URL is made substantially shorter in length and still links to the required page. This is achieved by using a redirect on a domain name that is short, which links to the web page that has the longer URL.
In this tutorial, I'll show you how to create a URL shortening plugin for WordPress using Google's URL Shortener API.
Reasons for URL Shortening
Before we start building a URL shortening plugin let's see a few examples as to why we may need this plugin:
- On Twitter and some other messaging services there is a limit to number of characters a message can contain. So if you're sending long URLs then it will occupy most of the message.
- Printed books or display signage will often use shortened URLs as they are easy to be read and type.
- QR codes have a character limit. Very long URLs don't fit, therefore shortening of the URL is required.
Acquiring a Google URL Shortener API Key
To use the Google URL Shortener API you'll need to acquire an API Key. This API key is used by Google to keep track of your application.
Continue reading %Create a URL Shortener Plugin for WordPress%
by Narayan Prusty via SitePoint
No comments:
Post a Comment