X-Git-Url: https://git.jankratochvil.net/?p=nethome.git;a=blobdiff_plain;f=public_html%2Fcgi-bin%2Fidnes-foto;fp=public_html%2Fcgi-bin%2Fidnes-foto;h=eaa15c91972731a087093e71359b4394ab9f563b;hp=0000000000000000000000000000000000000000;hb=f262b352b1da192913af430249ea764d73398667;hpb=20cdc4fa3e0efd1a30b4c79b97394154b8428868 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