Tag Archives: url shortener

Lengthy Google Maps URL shrinks to goo.gl/maps Short URL [in Labs]


A Simple Feature introduced by Google Labs in Google Maps could save a lot of work of ours.

How Hectic was it to Pass the URL of a Map location “Bengauluru, India” to your friend before? We measured the URL length for the Bengaluru position in Maps.. It is around 222 Characters and almost impossible to share to a friend (Unless you Pass the URL in Gtalk which adds href)

http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=Bangalore&sll=12.971606,
77.594376&sspn=0.68518,
0.883026&g=bangalore&ie=UTF8 &hq=&hnear=Bengaluru,+Karnataka, +India&ll=12.968845,77.59871&spn=0.021412,0.027595&z=15

The Second Method was to Shrink the lengthy URL using URL shortner services like bit.ly etc..

What if Google itself shortens the URL and Keeps it simple to you shrinking the long string of 222 Characters.. Google Labs has introduced a new Feature which does Shrinking… To Enable Click on “Labs” icon at Top of Google Maps Page..


From Now on, all your Lengthy Map URLs will be shrinked to http://goo.gl/maps/something … The Above Bengaluru,India location is now shrinked to http://goo.gl/UFUa

Did You Find This Feature Useful? Certainly Should Save some efforts to Shrink it Explicitly..

First Spotted by Mashable

Url shortening. The Complete Picture.

What is Url shortening?? U just give a BBBBBBBBBBBIIIIIIIIIIIIIIIIIIIIGGGGGGGGGGGGGG url as input and it’ll give you a short url with which you can access ur BIG url.

For example  http://www.chaaps.com/url-shortening…mplete-picture.html  becomes http://bit.ly/aIlWqJ .

So wat does that mean ? Both these urls are just alias !!.

Now a question . Why do this ? cos its easier to share smaller url. Now that you are clear with what it is.

Now i’ll share with you how you can build ur own url shortner site 🙂 oh yeah….All yours

Things you need

1:Brain

2:Cash

3:Googling skills

Steps to create the ultimate site :p

Step 1: Buy a domain name which is very short. Ex: www.ul.in

Step 2 : Get a hosting Service . now a days u get one for 500 bucks a year.

Step 3: create a database.( http://bit.ly/1roQbE )

Step 4: create a table ( http://bit.ly/13aXsN)

with two columns(distinct_guid,long_url)

Step 5: create a index for this table and apply other methods to make access to this table faster.(just google),

Step 6: Create two  php files

Step 7: First a Php to allow someone to shorten url

this php must be able to take in the long url as a parameter

on Taking in looong url

generate a random number  like distinct_guid =   uniqid(rand(99999999999999,99999999999999999));

make an entry in the table you created distinct_guid,long_url

finally the shortened  url will be www.ul.in/”distinct_guid”

Step 8: ok now we have shortened the url next create the real deal php

in the .htaccess file  edit make an entry for this

RewriteEngine on
RewriteRule .* theRealDeal.php

in this theRealDeal.php read the distinct guid with help of this   $_SERVER[‘REQUEST_URI’];

on getting the distinct guid you’ll need to forward to the long url. How do you do that ??

from the table we created get the long url for the associated Distinct guid

then use php header redirect to redirect to the long url

header( ‘Location: “{$long_url}”‘ );

There you go . The simplest way  to create your own url Shortener.

make sure you don have any html content in theRealDeal.php

Note:- it may not be as easy as it sounds.:p If you have any questions.Leave a comment and i’ll help you.