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


Manual Reference Pages  -  WWW::LONGURL (3)

.ds Aq ’

NAME

WWW::LongURL - Perl interface to the LongURL API.

CONTENTS

SYNOPSIS



  use WWW::LongURL;

  my $longurl = WWW::LongURL->new();

  my $expanded_url = $longurl->expand(http://bit.ly/cZcYFn);
  if (! $expanded_url) {
      die $longurl->error(), "\n";
  }

  my @shortening_services = $longurl->get_services();
  if (! @shortening_services) {
      die $longurl->error(), "\n";
  }
  for my $service (@services) {
      binmode(STDOUT, :utf8);
      print $service, "\n";
  }



DESCRIPTION

A simple interface for using the LongURL API to expand shortened URLs.

You can expand a bit.ly URL like so:



  my $url = $longurl->expand($some_bitly_url);



You can retrieve a list of shortening services supported by longurl like so:



  my @services = $longurl->get_services();



    METHODS

new Constructor
expand($url) On success, will return the expanded URL from LongURL. On failure, returns undef.
get_services On success, returns an array of shortening services that longurl.org supports. On failure, returns undef.
error Returns the last error message.

SUPPORTED SHORTENING SERVICES

LongURL will expand the URL from over 200 supported shortening services.

See <http://longurl.org/services>

REPOSITORY

Development is on-going at: https://github.com/kevinspencer/WWW-LongURL

AUTHOR

Kevin Spencer, kspencer@cpan.org

COPYRIGHT

Copyright (c) 2011. Kevin Spencer

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

See http://www.perl.com/perl/misc/Artistic.html

SEE ALSO

<http://longurl.org/>, <http://longurl.org/api/>
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 WWW::LONGURL (3) 2011-08-29

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