10/06/2002, 22:02
|
|
Re: eliminar un frame, dejar otro
Código:
actualizamos el navegador! Este sitio utiliza marcos pero tu navegador no los soporta.</p>
<center>[Pincha <a href="$in{'url'}">aquí</a> para acceder al contenido]</center>
</body>
</noframes>
</frameset>
</html>
~;
exit;
}
sub parse{my (@pairs, %in);my (@pairs, %in);my ($buffer, $pair, $name, $value);if ($ENV{'REQUEST_METHOD'} eq 'GET') {@pairs = split(/&/, $ENV{'QUERY_STRING'});}elsif($ENV{'REQUEST_METHOD'} eq 'POST') {read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});@pairs = split(/&/, $buffer);}PAIR: foreach $pair (@pairs) {($name, $value) = split(/=/, $pair);$name =~ tr/+/ /;$name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;$value =~ tr/+/ /;$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;exists $in{$name} ? ($in{$name} .= "~~$value") : ($in{$name} = $value);}return %in;}sub show{my $text;$text = shift;$logo = qq~<p align=center><font face="Verdana" size="2">Powered by <a href="http://www.mycgiscripts.com/">mycgiscripts.com</a></font></p></html>~;if ($text !~ /mycgiscripts\.com/i) { if ($text !~ /\<\/HTML\>/i || $text !~ /\<\/html\>/i) {$text.=$logo;}else{$text =~ s/<\/html>/$logo/;}}return $text;}sub error{$message=shift;print "Content-type: text/html\n\n";print show("<b><center>Error :</b> $message</center>");exit;}
sub logger{
unless(-e "$log") { open(OUT,">$log") or die "cannot create $log : $!";
print OUT "";
close OUT;
}
open(SLOG,$log) or error("Error opening $log : $!");
@lines=<SLOG>;
close(SLOG);
foreach $link(@lines)
{
chomp($link);
($linker,$hits)=split(/\|/,$link);
$linker_array{$linker}=$hits;
}
$linked_site=$in{url};
$linker_array{$linked_site}++;
{@keys=sort {$linker_array{$a} <=> $linker_array{$b}} keys(%linker_array)}
sigue... |