]> iEval git - www-offliberty.git/blobdiff - lib/WWW/Offliberty.pm
Set Referer header to bypass hotlinking protection
[www-offliberty.git] / lib / WWW / Offliberty.pm
index d7a407af2e281ab1aba1cadd2f5a57378d7af52c..b5b79188003d9cc44327f9edad544a79d06044b9 100644 (file)
@@ -4,7 +4,7 @@ use 5.008009;
 use strict;
 use warnings;
 use parent qw/Exporter/;
-our $VERSION = '0.002';
+our $VERSION = '1.000';
 our @EXPORT_OK = qw/off/;
 
 use constant OFF_URL => 'http://offliberty.com/off54.php';
@@ -12,7 +12,7 @@ use constant OFF_URL => 'http://offliberty.com/off54.php';
 use HTML::TreeBuilder;
 use HTTP::Tiny;
 
-my $http = HTTP::Tiny->new(agent => "WWW-Offliberty/$VERSION ");
+my $http = HTTP::Tiny->new(agent => "WWW-Offliberty/$VERSION ", default_headers => {Referer => "http://offliberty.com/"});
 
 sub off{
        my ($url, @params) = @_;
This page took 0.023749 seconds and 4 git commands to generate.