package Hotfile; # Perl->Hotfile API use LWP::UserAgent; our $HFA_VERSION = 0.1; # Perlmodul Version our $HFA_WHO = "Hotfile-PerlAPI/$HFA_VERSION"; # UserAgent-Name sub new() { # Die $->new Funktion my $class = shift; return bless {}, $class; } sub link_status(){ my $url = shift; my $browser = new LWP::UserAgent; $browser ->agent($HFA_WHO); my $resp = $browser->get("http://api.hotfile.com/?action=checklinks&links=$url&fields=status"); my $status = $resp->decoded_content(); return $status; } 1;