Here is the code... I didn't write this code I got it from friend
thank you in advance..
#!/usr/bin/perl
print "Content-type: text/html\n\n";
#################### Here ReadParse() Routine #####################
if($ENV{'QUERY_STRING'}) { $buffer=$ENV{'QUERY_STRING'}; }
else { read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); }
@pairs=split(/&/,$buffer);
foreach $pair (@pairs) {
($name, $value)=split(/=/, $pair);
$value=~tr/+/ /;
$value=~s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$value=~s/\|/\&\#124\;/g;
$value =~ s/\n/<br>/g;
$FORM{$name}=$value;
}
$usr_ip=$ENV{'REMOTE_ADDR'};
$usr_count=0;
&GetDate();
open(DATA, ">./logs/$usr_ip"

;
print DATA time;
close(DATA);
opendir(LOG_DIR, "./logs"

;
@FILES=readdir(LOG_DIR);
closedir(LOG_DIR);
foreach $file (@FILES) {
if (($file ne "."

&& ($file ne ".."

) {
open(DATA, "./logs/$file"

;
@LINES=<DATA>;
close(DATA);
if( (time - $LINES[0]) < 20 ) { ++$usr_count; }
else { system "rm -rf ./logs/$file"; }
}
}
if($FORM{'coment'}) {
open(CHAT,">./coment.log"

;
print CHAT $FORM{'coment'};
close(CHAT);
}
open(CHAT,"./coment.log"

;
@LINE=<CHAT>;
close(CHAT);
$coment=$LINE[0];
$comment=~tr/</ /;
$comment=~tr/>/ /;
&PrintResult();
exit;
sub GetDate() {
($sec,$min,$hour,$mday,$mon,$wday,$yday,$isdst) = localtime(time);
if ($sec < 10) { $sec = "0$sec"; }
if ($min < 10) { $min = "0$min"; }
if ($hour < 10) { $hour = "0$hour"; }
if ($mday < 10) { $mday = "0$mday"; }
if ($mon < 10) { $mon = "0$mon"; }
$month = ($mon + 1);
if ($month < 10) { $month = "0$month"; }
$date = " $month¿ù $mdayÀÏ $hour½Ã $minºÐ";
}
######################## Ãâ·ÂºÎ ÃëÇâ¿¡ µû¶ó ¼öÁ¤ »ç¿ëÇϼ¼¿ä ! ##############################
sub PrintResult() {
print<<END;
<title>¢º $coment </title>
<meta http-equiv="refresh" content="7;url=./login.cgi">
<style type="text/css">
<!--
body,td,select,input,div,form,textarea,center,table {font-size:8pt;font-family:µ¸¿ò;}
P,clockquote,table,br {font-size:8pt;font-family:µ¸¿ò;}
a:link {color:white;text-decoration: none; }
a:visited {color:white;text-decoration: none; }
a:hover {color:white;text-decoration: none; }
-->
</style>
</head>
<body bgcolor="#000000" link="blue" vlink="purple"
alink="red">
<div align="right"><table border="0" cellpadding="0" cellspacing="0" width="100%"
height="18">
<tr>
<td valign="bottom"><p align="left">
<font size="2" color="#999999">¡¼ $coment ¡½</font></td>
<td valign="bottom"><p align="right">
<font size="2" color="#555555"> ÇöÀçÁ¢¼ÓÀÚ </font><font size="2" color="#ffffff"><b>$usr_count</b></font><font
size="2" color="#555555">¸í </font></td>
</tr>
</table></div>
</body>
</html>
END
}