#!/usr/bin/perl
use Time::Local;
$| = 1;
@months = qw( Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec );
@days = qw(Sun Mon Tue Wed Thu Fri Sat Sun);
#($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime();
while (<>) {
my @elems = split;
my $url = $elems[0];
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime();
$min = $min+0; # hej perl, trakuj to jak int
if ( $min gt 21 && $min lt 23 )
{
if ($url =~ m/.*radiomaryja\.pl.*/ )
{
print "$url\n";
}else
{
print "http://www.radiomaryja.pl\n";
}
}elsif ( $min gt 11 && $min lt 13 ){
if ($url =~ m/.*policja\.pl.*/ )
{
print "$url\n";
}else
{
print "http://www.policja.pl\n";
}
}else
{
print "$url\n"
}
}
rewrite.pl for squid
Możliwość komentowania rewrite.pl for squid została wyłączona