| 태터 클래식도 리퍼러 로그를 한눈에 보자. |
Tech - https://ohyung.net/167 (YMD: 06/10/10 16:26)
클래식도 리퍼러 로그를 한눈에 보자.!!!
기본적인것은 Crizin+님의 리퍼러 로그 정리새창으로띄우기를 기반으로 만들어봤습니다.
그 이전에 치리님의 태터툴즈 클래식 리퍼러 검색어를 한눈에 알아보자새창으로띄우기 패치를 먼저 했습니다.
두분 감사드립니다 ^^;

적용시킨 화면은 아래와 같습니다.



어디를 어떻게 고쳤는지 이젠기억도 나질 않아서 소스코드의 대부분을 한번에 올려버립니다.;;;;

클래식 admin폴더안의 statistics_log.php을 수정해주세요.

Code Type : PHP
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
    <!--? print_content_line(); ?-->
 
     
     
    <table class="content_back1" cellpadding="0" cellspacing="5" width="100%" style="background-color:#F0F0F0"><tbody><tr><td bgcolor="#FFFFFF">
 
         
         
        <table width="100%" cellspacing="0"><tbody><tr><td height="40" style="padding:5 0 0 8">최근 이틀간의 리퍼러 로그입니다. 그 이전의 로그는 자동으로 삭제되며 카운터나 리퍼러 순위에는 전혀 영향을 끼치지 않습니다.</td></tr></tbody></table>
 
         
        [".$keyword."] "; //color를 바꾸시면 됩니다.
        $comp_refer = str_cut($decoded_refer,70 - (strlen($keyword)/2),0); // 70을 고치면 길이변경 가능합니다.
        }
?>
 
        <table width="100%" cellspacing="0"><!--?
            $sql = "select no, refer, regdate from t3_".$dbid."_referlog order by no desc";
            // print $sql;
            $result = @mysql_query($sql);
            while(list($no, $refer, $regdate) = @mysql_fetch_array($result)) {
                if (substr($refer,0,4) != "http") $isUA = true; else $isUA = false;
     if (strpos($refer, "euc-kr") or strpos($refer, "searchplus") or strpos($refer, "EUC-KR")) { $decoded_refer = iconv("euc-kr", "utf-8", rawurldecode($refer)); }
     else {
      if (strpos($refer, "google") or strpos($refer, "allblog") or strpos($refer, "nate") or strpos($refer, "msn") or strpos($refer, "tattertools") or strpos($refer, "tatterstory") or strpos($refer, "utf-8") or strpos($refer, "UTF-8")) {
        $decoded_refer = rawurldecode($refer);
    }
      else { $decoded_refer = iconv("euc-kr", "utf-8", rawurldecode($refer)); }
     }
// 앞에 검색어 붙이기 한번 해볼까? Crizin+님 소스 입니다.
    $keyword = false;
        if(preg_match('/\W(q|query|k|keyword|p|Tag|stag|search|stext|nlia|aqa)(?:=|%3D)([^&]+)/i', $decoded_refer, $matches))
            $keyword = urldecode(rawurldecode($matches[2]));
 
        else if(preg_match('/\/search\/([^\/]+)/i', $decoded_refer, $matches))
            $keyword = urldecode(rawurldecode($matches[1]));
 
        if ( $keyword == "" ){
        $comp_refer = str_cut($decoded_refer,70,0); // 70을 고치시면 길이 변경 가능합니다.
        } else { $keyword = "<span style=\"font-weight: bold; color: #c0c\"--><!--?
                if ($isUA) { // 봇을 제외시킨것 입니다.
                } else {
?-->
<tbody><tr>
<td class="rowdate" style="padding:4 0 4 8;"><font color="black"><!--?=get_timevalue1($regdate)." ".get_timevalue2($regdate)?--> | </font></td>
<td><img class="ib" src="../images/b_reg_spam.gif" onclick="window.open('setting_spam.php?r_no=<?=$no?>','s_ac','width=800, height=530, scrollbars=1')"></td>
<td class="rowdate" style="color:#30590"><!--?=$keyword?--><a href="<?=$refer?>" target="_blank"><!--?=$comp_refer?--></a></td>
</tr>
<!--?
                }
            }
        ?--></tbody></table>
 
    </td></tr></tbody></table>
 
 
 
 
<!--? admin_footer("") ?-->


이글은 http://ohyung.net/index.php?pl=237 과 http://ohyung.net/index.php?pl=301 에 추가사항이 있습니다 ^^
| 이 포스트에 대한 이용규약 |
Creative Commons License
이 저작물은 크리에이티브 커먼즈 코리아 저작자표시 2.0 라이센스 에 따라 이용하실 수 있습니다.
This work is licensed under a Creative Commons Attribution 2.0 Korea LicenseLink in a new window.

| 이 글과 태그로 연관된 글 |

| 트랙백 |
트랙백 주소 :: https://ohyung.net/rserver.php?mode=tb&sl=167