1
0
Fork 0
mirror of https://github.com/perlbot/perlbuut synced 2025-06-07 16:55:42 -04:00

adding zippit plugin from ik's sources

This commit is contained in:
Ryan Voots 2010-08-01 12:44:31 -04:00
parent f059030379
commit 0ef7df63e7

18
plugins/zippit.pm Normal file
View file

@ -0,0 +1,18 @@
use LWP::UserAgent;
use URI::Escape qw/uri_escape/;
no warnings 'void';
sub {
my( $said ) = @_;
my $ua = LWP::UserAgent->new();
my $foo = $ua->get('http://xn--55d.com/cgi/yep2.pl?txt='.uri_escape($said->{body}));
if ($foo->is_success) {
print $foo->content;
} else {
print $foo->status_line;
}
}
__DATA__
head http://url/; returns the response code and server type from a HEAD request for a particular url.