비접속자의 ip를 지울려면..? 정보
기타 비접속자의 ip를 지울려면..?관련링크
본문
현재 접속자를 아이피로 표시한 후 눌러서 메시지를 보낼려고 했는데..
글쎄, 접속 종료 후에도 계속 남아 있네요~
나간 아이피를 자동 삭제할 수 있는 방법이 없는가 하구요.
아래는 아이피 체크해서 넣는 소스부분입니다.
emoticon_052emoticon_041emoticon_034emoticon_037emoticon_026
//-----현재 접속자 부분
$w_time = $time+5;
$FILE = @fopen("data/$REMOTE_ADDR","w");
$info = time();
@fputs($FILE,$info);
@fclose($FILE);
$user[] = $REMOTE_ADDR;
$USER1 = opendir("data");
while($entry=readdir($USER1)) if($entry!="."&&$entry!=".."&&$entry!="data.txt") {
if ($REMOTE_ADDR != $entry) {
$info = file("data/$entry");
if((time()-$w_time)>chop($info[0])) @unlink("data/$entry");
else $user[] = $entry;
}
}
$total_user = count($user);
//$ip = implode("\n",$user);
// 현재 접속자 부분 끝
emoticon_007emoticon_079emoticon_093emoticon_082emoticon_047emoticon_074emoticon_013emoticon_115
링크를 눌러서 CHAT을 클릭해 보시면 아이피가 계속 누적되어 나옵니다.
감사합니다.
글쎄, 접속 종료 후에도 계속 남아 있네요~
나간 아이피를 자동 삭제할 수 있는 방법이 없는가 하구요.
아래는 아이피 체크해서 넣는 소스부분입니다.
emoticon_052emoticon_041emoticon_034emoticon_037emoticon_026
//-----현재 접속자 부분
$w_time = $time+5;
$FILE = @fopen("data/$REMOTE_ADDR","w");
$info = time();
@fputs($FILE,$info);
@fclose($FILE);
$user[] = $REMOTE_ADDR;
$USER1 = opendir("data");
while($entry=readdir($USER1)) if($entry!="."&&$entry!=".."&&$entry!="data.txt") {
if ($REMOTE_ADDR != $entry) {
$info = file("data/$entry");
if((time()-$w_time)>chop($info[0])) @unlink("data/$entry");
else $user[] = $entry;
}
}
$total_user = count($user);
//$ip = implode("\n",$user);
// 현재 접속자 부분 끝
emoticon_007emoticon_079emoticon_093emoticon_082emoticon_047emoticon_074emoticon_013emoticon_115
링크를 눌러서 CHAT을 클릭해 보시면 아이피가 계속 누적되어 나옵니다.
감사합니다.
댓글 전체
아참..!!
성길님 땡---큐~~요emoticon_002
성길님 땡---큐~~요emoticon_002
으.. 여기에 문제가..
제가 모르고 아래 부분의 수치를 그만..
$time="10000000"; 이만큼이나 주었네요.. 헐..
그러니 계속 남아 있을 수 밖에...
$time="10"; //리플레시 타임 10정도가 적당
제가 모르고 아래 부분의 수치를 그만..
$time="10000000"; 이만큼이나 주었네요.. 헐..
그러니 계속 남아 있을 수 밖에...
$time="10"; //리플레시 타임 10정도가 적당
$time+5;
제 짧은 생각으로는 이 부분이 의심이 가는데요.
이 수치를 조절해 보세요.
제 짧은 생각으로는 이 부분이 의심이 가는데요.
이 수치를 조절해 보세요.