채택완료

현재접속자수 늘리는법

2016-03-25 (금) 01:04:57 4,140

현재까지 누적된 접속자수가 아니라 실시간으로 현재 접속자수를 뻥튀기 하고 싶습니다

 

current_connect.php에서 바꿔야 될거같은데 

 

뭘 어떻게 바꿔야 되나요 


랜덤소스로 알려주시면 더 감사하겠씁니다ㅠㅠㅠ


Copy
<?phpinclude_once('./_common.php');$g5['title'] = '현재접속자';include_once('./_head.php');$list = array();$sql = " select a.mb_id, b.mb_nick, b.mb_name, b.mb_email, b.mb_homepage, b.mb_open, b.mb_point, a.lo_ip, a.lo_location, a.lo_url            from {$g5['login_table']} a left join {$g5['member_table']} b on (a.mb_id = b.mb_id)            where a.mb_id <> '{$config['cf_admin']}'            order by a.lo_datetime desc ";$result = sql_query($sql);for ($i=0; $row=sql_fetch_array($result); $i++) {    $row['lo_url'] = get_text($row['lo_url']);    $list[$i] = $row;    if ($row['mb_id']) {        $list[$i]['name'] = get_sideview($row['mb_id'], cut_str($row['mb_nick'], $config['cf_cut_name']), $row['mb_email'], $row['mb_homepage']);    } else {        if ($is_admin)            $list[$i]['name'] = $row['lo_ip'];        else            $list[$i]['name'] = preg_replace("/([0-9]+).([0-9]+).([0-9]+).([0-9]+)/", G5_IP_DISPLAY, $row['lo_ip']);    }    $list[$i]['num'] = sprintf('%03d',$i+1);}include_once($connect_skin_path.'/current_connect.skin.php');include_once('./_tail.php');


|

답변 2개

채택된 답변
+20 포인트

쉬운방법은 관리자 환경설정에서 현제접속자를 10분이상 100분 정도로하면 접속자수는 많아질겁니다.

게시물 조회수 뻥튀기 

/bbs/board.php 에서 아래 내용을

sql_query(" update {$write_table} set wr_hit = wr_hit + 1 where wr_id = '{$wr_id}' ");

이렇게 해보세요. 수치는 적당히 조절하시고..

$hit_rand = rand(1,100);  // 랜덤 조회수

sql_query(" update {$write_table} set wr_hit = wr_hit + $hit_rand where wr_id = '{$wr_id}' ");

답변을 작성하려면 로그인이 필요합니다.