½ÃÀÛÆäÀÌÁö·Î Áñ°Üã±âÃß°¡
·Î±×ÀÎ
ȸ¿ø°¡ÀÔ l Ã⼮üũ l ¸¶ÀÌÆäÀÌÁö l CGIMALL
ÀÚ·á½Ç »çÀÌÆ®µî·Ï ·©Å·100 ÇÁ·Î±×·¥¸®ºä °ü¸®ÀÚÃßõÀÚ·á Ãʺ¸°¡À̵å
Ä¿¹Â´ÏƼ
Àüü ÆîÃ帱â
Äü¸Þ´º¸µÅ© jquery , CSS , PHP , Javascript , ¹«·áÆùÆ® , ASP
»ó¼¼°Ë»ö
Ȩ > Ä¿¹Â´ÏƼ > Áú¹®°ú´äº¯ »ó¼¼º¸±â
Ä¿¹Â´ÏƼ ±¸Àα¸Á÷
»çÀÌÆ®µî·Ï
Ŭ¶ó¿ìµåű×
Javascript
PHP
asp
css
mysql
html
jquery
image
Mobile
API
slide
°Ô½ÃÆÇ
¸Þ´º
ÇöÀçÁ¢¼ÓÀÚ ¸í »õ·Î°íħ
°Ô½ÃÆÇŸÀÌƲ Áú¹®°ú´äº¯ / »ó¼¼º¸±â
Æ®À§ÅÍ·Î º¸³»±â
Ãßõ¼ö 47 | Á¶È¸¼ö 600 | µî·ÏÀÏ 2000-03-13 23:25:37
".
"
" ];
}
close GIL;

my $x = 0;
my @result;
for ( sort { $a->[0] cmp $b->[0] } values %LOG ) {
push @result, "$_->[1]
";
$x ;
}
print "Content-type: text/html

";
print<

¹æ¹® ±â·Ï




´Ð³×ÀÓ

Anonymous

À̸ÞÀÏ

Á¦¸ñ

logÀúÀå Ä«¿îÅÍ¿¡´ëÇؼ­...
³»¿ë
logÈ­ÀÏ·Î ÀúÀåµÇ´Â Ä«¿îÅ͵¥ÀÌÅÍÁß Æ¯Á¤³¯Â¥¸¸À» ÃßÃâÇÏ¿© ±×°ªÀ» ´õÇÏ°í ½Í½À´Ï´Ù.
Âü°í·Î ¾Æ·¡ ¼Ò½º´Â 2000-02-06°ú°°À̳¯Â¥º°·Î Ä«¿îÅÍµÈ µ¥ÀÌŸ¸¦ Àоîµé¿© Á¢¼ÓȽ¼ö,ipÁÖ¼Ò,ºê¶ó¿ìÀú¸¦ ¹àÇôÁÝ´Ï´Ù.
Àú´Â À̼ҽº¸¦ ¼öÁ¤ÇÏ¿© À§ÀÇ 2000-02-06°ú °°Àº µ¥ÀÌŸµé Áß¿¡¼­ ƯÁ¤³¯Â¥µé¸¸À» ´õÇÏ¿©¼­ Åë°è¸¦ ³»°í ½Í½À´Ï´Ù. °í¼ö´ÔµéÀÇ °í°ßºÎŹµå¸³´Ï´Ù.
#!/usr/bin/perl
use Time::Local;
get_log( init() );

####################################################
sub get_log {
my %GIL = @_;
my @yoil = qw(ÀÏ ¿ù È­ ¼ö ¸ñ ±Ý Åä);

#LOGÇü½Ä: "$year-$mon-$day$DELIM$hour:$min$DELIM$ip$DELIM$host$DELIM$agent
";
my $DELIM = chr(30);
my ($file, $date_title);
if ( $GIL{day} ) {
$file = "log/$GIL{day}";
my ($sec,$min,$hour,$day,$mon,$year, $week) =
map { sprintf
%.2d
,$_ } localtime get_time($GIL{day});
$mon ;
$year = 1900 if length $year <=3;
$date_title = "$GIL{day} ¹æ¹®ÀÚ [ $yoil[$week]¿äÀÏ ]";
} else {
my ($sec,$min,$hour,$day,$mon,$year, $week) =
map { sprintf
%.2d
,$_ } localtime;
$mon ;
$year = 1900 if length $year <=3;
$file = "log/$year-$mon-$day";
$date_title = "¿À´Ã ¹æ¹®ÀÚ $year³â $mon¿ù $dayÀÏ [ $yoil[$week]¿äÀÏ ]";
}
my (%COUNT, %LOG);
open GIL, $file;

for ( ) {
my ($date, $time, $ip, $host, $agent) = split /$DELIM/, $_;
$count = $COUNT{ $ip };
$ip2 = $host ? "$ip ($host)" : $ip;
$agent =~ s@(MSIE)@$1@;
$agent =~ s/compatible; //i;
$agent =~ s/Windows/Win/;
$LOG{ $ip } = [ "$time", "
".
"$count
$time$ip2$agent









$x ¸í


$date_title













@result
Ƚ¼ö ½Ã°£ Á¢¼ÓÁÖ¼Ò »ç¿ë ºê¶ó¿ìÁ®




END
}

####################################################
sub init {
my (%GIL, $buffer);
if ($ENV{
REQUEST_METHOD
} eq "POST") {
read(STDIN, $buffer, $ENV{
CONTENT_LENGTH
});
}
else {
$buffer = $ENV{
QUERY_STRING
};
}
for $item (split /&/, $buffer) {
my ($name, $value) = split /=/, $item;
$name =~ tr/ / /; $name =~ s/%(..)/chr(hex($1))/ge;
$value =~ tr/ / /; $value =~ s/%(..)/chr(hex($1))/ge;
$GIL{$name} = $value;
}
%GIL;
}

####################################################
sub get_time {
my ($year, $mon, $day) = split
-
, shift;
$year -= 1900;
timelocal(1, 0, 0, $day, $mon - 1, $year)
}
__END__
Ãßõ½ºÅ©·¦¼Ò½ºº¸±â ¸ñ·Ï
ÀÌÀü°Ô½Ã±Û ¿ìÆí¹øÈ£°Ë»ö 2000-03-13 18:04:29
´ÙÀ½°Ô½Ã±Û ¸µ½º 2.3 Çѱ۹öÀü 2000-03-14 08:55:48