누가 검색했는지 알수 있는 방법 없나요? 정보
누가 검색했는지 알수 있는 방법 없나요?본문
누군가가 '바보'라는 단어를 검색했습니다.
관리자 페이지에 '바보'라는 단어를 검색한 사람 아이디나 이름이 나오는 기능과
누가 클릭했는지 알수 있는 방법 있나요?
소스 구현 어려울까요?
포인트 많이 드릴게요
댓글 전체
이상하네요.. 그런소스는 스킨자료실에 접속경로 확인하는거 있는데 그거 말하는거 아닌가요?
관리자모드 접속자 현황에 주소를 보면 검색단어와 아이피를 볼 수 있습니다.
접속자 말고, 홈페이지에서 검색어를 입력한 사람 이름이나 아이디 알수 있는지..
g4_popular 테이블에 mb_id 필드를 추가하고 /bbs/search.php에서 다음을 수정하세요
$sql = " insert into $g4[popular_table] set pp_word = '$search_str', pp_date = '$g4[time_ymd]', pp_ip = '$_SERVER[REMOTE_ADDR]' ";
이걸 다음과 같이
$sql = " insert into $g4[popular_table] set pp_word = '$search_str', pp_date = '$g4[time_ymd]', pp_ip = '$_SERVER[REMOTE_ADDR]', mb_id = '$member[mb_id] ";
검색을 누가 뭘 했는지 보고 싶다면 다음과 같이 결과 확인
$query = "select * from `$g4[popular_table] where mb_id order by pp_id DESC"
while($row = sql_fetch_array($query)) {
echo "$row[pp_word] - $row[mb_id]";
}
$sql = " insert into $g4[popular_table] set pp_word = '$search_str', pp_date = '$g4[time_ymd]', pp_ip = '$_SERVER[REMOTE_ADDR]' ";
이걸 다음과 같이
$sql = " insert into $g4[popular_table] set pp_word = '$search_str', pp_date = '$g4[time_ymd]', pp_ip = '$_SERVER[REMOTE_ADDR]', mb_id = '$member[mb_id] ";
검색을 누가 뭘 했는지 보고 싶다면 다음과 같이 결과 확인
$query = "select * from `$g4[popular_table] where mb_id order by pp_id DESC"
while($row = sql_fetch_array($query)) {
echo "$row[pp_word] - $row[mb_id]";
}
감사합니다 ^^
<?
include_once("./_common.php");
include_once("$g4[path]/head.sub.php");
include_once("$g4[path]/head.php");
$query = "select * from `$g4[popular_table] where mb_id order by pp_id DESC"
while($row = sql_fetch_array($query)) {
echo "$row[pp_word] - $row[mb_id]";
}
include_once("$g4[path]/tail.php");
include_once("$g4[path]/tail.sub.php");
?>
이렇게 작성했는데 500 내부서버오류가 나네요..
http://zv.pe.kr/search_who.php
include_once("./_common.php");
include_once("$g4[path]/head.sub.php");
include_once("$g4[path]/head.php");
$query = "select * from `$g4[popular_table] where mb_id order by pp_id DESC"
while($row = sql_fetch_array($query)) {
echo "$row[pp_word] - $row[mb_id]";
}
include_once("$g4[path]/tail.php");
include_once("$g4[path]/tail.sub.php");
?>
이렇게 작성했는데 500 내부서버오류가 나네요..
http://zv.pe.kr/search_who.php
$query에서 작음따옴표가 빠져서 그런거네요...
또 세미콜론이 빠졌군요 후훗
고쳤습니당~
또 세미콜론이 빠졌군요 후훗
고쳤습니당~
감사^^