参考:http://www.cnblogs.com/shuchao/archive/2010/01/05/generate-google-shorten-url-without-toolbar.html
1.浏览器插件:Firefox的goo.gl插件 Chrome的gool.gl插件
2.在线生成:gaigalas.net
3.自己实现:(待验证)
function shortify(url)
{
var auth_token = getUrlShorteningRequestParams(url);
var urlEscaped = escape(url).replace(/\+/g,"%2B");
xmlhttp.open("POST", "http://goo.gl/api/url?
user=toolbar@google.com&url=" + urlEscaped
+ "&auth_token=" + auth_token, false);
xmlhttp.onload = xmlhttpLoad;
xmlhttp.send(null);
}
{
var auth_token = getUrlShorteningRequestParams(url);
var urlEscaped = escape(url).replace(/\+/g,"%2B");
xmlhttp.open("POST", "http://goo.gl/api/url?
user=toolbar@google.com&url=" + urlEscaped
+ "&auth_token=" + auth_token, false);
xmlhttp.onload = xmlhttpLoad;
xmlhttp.send(null);
}