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:
parent
f059030379
commit
0ef7df63e7
1 changed files with 18 additions and 0 deletions
18
plugins/zippit.pm
Normal file
18
plugins/zippit.pm
Normal 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.
|
Loading…
Add table
Reference in a new issue