From: lace <> Date: Wed, 14 Jul 2010 11:12:57 +0000 (+0000) Subject: idnes-foto-old0 X-Git-Url: https://git.jankratochvil.net/?p=nethome.git;a=commitdiff_plain;h=f262b352b1da192913af430249ea764d73398667 idnes-foto-old0 --- diff --git a/public_html/cgi-bin/idnes-foto b/public_html/cgi-bin/idnes-foto new file mode 100755 index 0000000..eaa15c9 --- /dev/null +++ b/public_html/cgi-bin/idnes-foto @@ -0,0 +1,73 @@ +#! /usr/bin/perl +use strict; +use warnings; +require LWP::Simple; +require URI::Escape; + +$|=1; +my $BASE; +if (exists $ENV{"QUERY_STRING"}) { + $BASE=($ENV{"QUERY_STRING"}=~m{^url=([^&]*)})[0]; + $BASE=URI::Escape::uri_unescape($BASE); + 0==@ARGV or die "ARGV count != 0"; + $BASE||=""; + } +else { + 1==@ARGV or die "ARGV count != 1"; + $BASE=$ARGV[0]; + } + +if ($ENV{"GATEWAY_INTERFACE"}) { + print <<"EOH"; +Content-type: text/html; charset=windows-1250 + +EOH + } +print <<"EOH"; +
+[^<]*
} or die "No text found: $infourl"; + my $p_text=$&; + print <<"EOH" if !$seen_p_text{$p_text}++; +$p_text +EOH + } + die $pageurl if !$did; + $pageno++; + } + } +print <<"EOH"; +EOF
+ +EOH