[ic] Short codes and QR code generator

S_caballe ea3bkz at amsat.org
Fri Mar 23 17:38:48 UTC 2012

Al 23/03/12 08:13, En/na Paul Jordan ha escrit:
> Anybody have any work they can share using QR codes in IC, like a usertag or
> such? Also looking for Short Codes (like bit.ly), mostly WRT to generating them.

I use this usertag for tinyurl service:

UserTag tinyurl HasEndTag
UserTag tinyurl Interpolate

UserTag tinyurl Routine   <<EOR

sub {
use strict;
use LWP;
my $input = $_[0];
$input =~ s/^ht{2}p:\/{2}//;
my $url = 'http://tinyurl.com/api-create.php?url=http://'.$input;
my $browser = LWP::UserAgent->new;
my $response = $browser->get($url);
die "Can't get $url --", $response->status_line unless $response->is_success;
return $response->content." "}


Salvador Caballé

More information about the interchange-users mailing list