GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
WWW::Shorten::Googl(3) User Contributed Perl Documentation WWW::Shorten::Googl(3)

WWW::Shorten::Googl - Perl interface to <http://goo.gl/>

  use strict;
  use warnings;
  use WWW::Shorten::Googl; # OR
  # use WWW::Shorten 'Googl';
  # $ENV{GOOGLE_API_KEY} should be set
  my $url = 'http://metacpan.org/pod/WWW::Shorten::Googl';
  my $short_url = makeashorterlink($url);
  my $long_url  = makealongerlink($short_url);
  # Note - this function is specific to the Googl shortener
  my $stats = getlinkstats( $short_url );

A Perl interface to the <http://goo.gl/> URL shortening service. Googl simply maintains a database of long URLs, each of which has a unique identifier.

The function "makeashorterlink" will call the Googl web site passing it your long URL and will return the shorter Googl version.

If you provide your Google username and password, the link will be added to your list of shortened URLs at <http://goo.gl/>.

See AUTHENTICATION for details.

The function "makealongerlink" does the reverse. "makealongerlink" will accept as an argument either the full URL or just the identifier.

Given a <http://goo.gl/> URL, returns a hash ref with statistics about the URL.

See <http://code.google.com/apis/urlshortener/v1/reference.html#resource_url> for information on which data can be present in this hash ref.

To use this shorten service, you'll first need to setup an API Key <https://developers.google.com/url-shortener/v1/getting_started#APIKey>.

Once you have that key setup, you will need to set the "GOOGLE_API_KEY" environment variable to use that key.

Magnus Erixzon <magnus@erixzon.com>

Chase Whitener <capoeirab@cpan.org>

Copyright 2004, Magnus Erixzon <magnus@erixzon.com>.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

WWW::Shorten, <http://goo.gl/>, API Reference <https://developers.google.com/url-shortener/v1/getting_started>

2016-04-24 perl v5.40.2

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.