Google has very recently released access to the API for their URL shortening service (ie, just a couple of days ago) so I have put together a class that allows access to that API. The official site is goo.gl; where you can manually go and enter your own URL's.
Setting up a permalinks structure in Wordpress one of the things I normally do right after installing a blog, before event getting started on the templates. However, I always seem to forget what to put in the box so I thought I would put this here to remind myself and to go over the best practices on your own site in terms of SEO.
To set the permalinks on your Wordpress install go into Settings > Permalinks and enter the following into the Custom Structure field.
When Google looks at a page it takes a snapshot of that page and uses this to match against the query a user entered. To view these cached pages run a Google search and look at the Cached link next to the green URL text of the result. When you view the cached page Google will also give you a date that the page was last cached on. This can be used as a metric of your sites importance as the more often the site is cached, the more favourable Google views your page.
The is.gd URL shortening service is yet another site that converts a long URL into a small one, but is.gd differs in that it generally produces smaller URLs than others. The is.gd API doesn't require that you create an account on the site, but there are one or two limitations to using the service that you should be aware of first. You can find out these limitations by reading the is.gd terms and conditions.
There are a few URL shortening services about, of which bit.ly is just one. However, it does provide a nice API for developers to interact with the site. Not only is it possible to shorten URL's, you can also reverse them, find out information about the site and get information about how many people have used to link. The API requires you to create an account to interact with the API. Once you have created an account you can use the API service.
TinyURL is a service where you can convert a long URL string to a really small one. For instance, the following URL, which points to the Googleplex on Google Maps.
Can be converted to the following.
The PHP function preg_replace() has powerful functionality in its own right, but extra depth can be added with the inclusion of the e modifier. Take the following bit of code, which just picks out the letters of a string and replaces them with the letter X.
Lots of applications require a user to input a URL and lots of problems occur as a result. I was recently looking for something that would take a URL as an input and allow me to make sure that is was formatted properly. There wasn't anything that did this so I decided to write it myself.
Print out a full URL for a link will sometimes mess up your formatting, especially if you URL is quite long. This might be the case if you are linking to a Google search page, or have an automated script that shows numerous URLs of indeterminate length. The following function will reduce any URL longer than 45 characters by splitting it in two and join them up with a simple string.
There might be many instances where you will create a program in PHP that takes a URL as input and does something with the address. This might be a site analysis or an image resize, but whatever the use is, you need to be sure that the URL will work or at least has the same format.