PDA

View Full Version : TinyURL Support



Liam
07-24-2009, 02:14 AM
I'd recommend that URLs be run through TinyURL in addition to a direct link.

I hacked this together in 15 minutes as a proof of concept, but I really have no idea what I'm doing.. :) It works pretty well!



use LWP::Simple;

$tinyurl = "http://tinyurl.com/api-create.php?url=". $hotlinknormal;
$shorturl = get($tinyurl);



Thanks,

Liam

Tom
08-09-2009, 10:02 PM
Liam: where did you add that script?

Liam
09-02-2009, 01:16 AM
I added it in the Manager.pl file.

The 'use LWP::Simple;' goes in the header, and the other code goes under the hotlink section.

You then have to create another text box to display the actual link in the HTML... I just mirrored what was there and changed the text to $shorturl

I know next to zero about Perl programming, so I'm probably not the one to ask.. Hope this helps..

Liam