xman โพสต์ 2009-1-10 18:41:53

จำลองสมาชิก support Member + visitors

http://www.discuz.net/thread-1176789-1-1.html

เป็นการสร้างคนปลอมซึ่งก็คือผีนั่นเอง
เพราะว่ามันก็ยังวังเวงวเหมือนเดิม ถึงแม้จะดูว่ามีคนออนไลน์เยอะ

วิธีทำ
เปิดไฟล์ index.php

หา $discuz_action = 1;

ใส่โค๊ดนี้เพิ่มเข้าไป//虚拟在线会员+游客 START

$virtualhack = '1';               // 1=开 0=关

if($virtualhack=='1') {

    $mintime = 500;                // 在线的最小值(秒)
    $maxtime = 800;                // 在线的最大值(秒)
    $dis_time = 810;               // 超过dis_time(秒)删除

    $current_user = 200;             // 当前用户少于10,就执行虚拟用户

    $min_user = 20;                // 设定想增加多少会员的最小值
    $max_user = 100;                // 设定想增加多少会员的最大值

    $min_guest = 50;                // 设定想增加多少访客的最小值
    $max_guest = 80;                // 设定想增加多少访客的最大值

    $start_uid = 2;             //起始会员UID
    $end_uid = 600;            //结束会员UID
   
    $action_arr = array("0","0","1","1","2","191","1","2","2","2","31","51"); //设定虚拟用户允许动作

    $current = time();
    $current_different = $current - $dis_time;

    $db -> query("DELETE FROM {$tablepre}sessions WHERE ip1='000' AND lastactivity <='$current_different'");

    $query = $db -> query("SELECT COUNT(*) FROM {$tablepre}sessions ");
    $onlineuser = $db -> result($query, 0);

    if($onlineuser <= $current_user ) {

      $randguest = mt_rand($min_guest, $max_guest); //游客
      $randuser = mt_rand($min_user, $max_user);    //会员

      $query = $db -> query("SELECT fid FROM {$tablepre}forums WHERE type = 'forum'");
      while($fidresult = $db -> fetch_array($query)) {
            $fidscope[] = $fidresult['fid'];
      }

//随机插入在线会员
      for($i = 1; $i <= $randuser; $i++) {

            $randtime = mt_rand($mintime, $maxtime);
            $onlinetime = $current - $randtime;

            $randaction = mt_rand(0, count($action_arr));
            $onlineaction = $action_arr[$randaction];

            $onlinefid = 0;
            if($onlineaction == '2') {
                $randfid = mt_rand(0, count($fidscope));
                $onlinefid = $fidscope[$randfid];
            }
            $online_sid = random(6);   
            

            $rand_uid = mt_rand($start_uid, $end_uid);
            $query = $db -> query("SELECT `uid`,`username` FROM {$tablepre}members WHERE `uid` = '$rand_uid'");
            while($row = $db -> fetch_array($query)){
                $db -> query("INSERT INTO {$tablepre}sessions (sid,ip1, groupid, styleid, lastactivity, action, fid, uid, username )
                VALUES ('$online_sid','000' ,'10', '1','$onlinetime','$onlineaction','$onlinefid','$row','$row')");
            }
      }

//随机插入在线游客
      for($i = 1; $i <= $randguest; $i++) {
            $randtime = mt_rand($mintime, $maxtime);
            $onlinetime = $current - $randtime;

            $randaction = mt_rand(0,count($action_arr));
            $onlineaction = $action_arr[$randaction];

            $onlinefid = 0;
            if($onlineaction == '2') {
                $randfid = mt_rand(0,count($fidscope));
                $onlinefid = $fidscope[$randfid];
            }
            $online_sid = random(6);
            $db -> query("INSERT INTO {$tablepre}sessions (sid,ip1, groupid, styleid, lastactivity, action, fid )
                VALUES ('$online_sid','000' ,'7', '1','$onlinetime','$onlineaction','$onlinefid')");
      }


    }
}

//虚拟在线会员+游客 END

acaz โพสต์ 2009-1-10 21:03:36

หลอนดีนะ :)

nasz โพสต์ 2009-1-10 21:10:29

{:15_666:}ขอบคุณครับ

christxzapro99 โพสต์ 2009-1-13 20:14:17

{:14_651:}มีแบบนี้ด้วยหะ !!!!

sayki โพสต์ 2009-1-13 23:16:04

5555++ ปกติผมมีคนแค่ 40 คนขั้นเทพนี่ เอาไป 300 กว่า เวอร์มากครับ

professio โพสต์ 2009-1-13 23:39:22

แก้ไขล่าสุด professio เมื่อ 2009-1-13 23:49

เพิ่ม ต่อ จาก

$discuz_action = 1; เลย ปะครับ

ผม ใส่ต่อแล้ว Parse error งงง มากมาย

sayki โพสต์ 2009-1-14 00:05:16

เพิ่มต่อเลยครับผม

professio โพสต์ 2009-1-14 11:51:22

แก้ไขล่าสุด professio เมื่อ 2009-1-14 11:53

ทำไม ผม มัน ขึ้น Error ครับ บอกที

nasz โพสต์ 2009-1-14 12:26:54

// Virtual online Member + visitors START
$ virtualhack ='1 '; // 1 = Open 0 = Close

if ($ virtualhack =='1 ') (
        $ mintime = 500; // online minimum (seconds)
        $ maxtime = 800; // online maximum (seconds)
        $ dis_time = 810; // more than dis_time (seconds) to delete

        $ current_user = 180; // the current user is less than 10, on the implementation of virtual users

        $ min_user = 20; // Set the number of members want to increase the minimum
        $ max_user = 100; // Set the number of members want to increase the maximum

        $ min_guest = 50; // Set the number of visitors would like to increase the minimum
        $ max_guest = 80; // Set the number of visitors would like to increase the maximum

        $ start_uid = 2; // Start Member UID
        $ end_uid = 600; // end of Member UID
        $ action_arr = array ( "0", "0", "1", "1", "2", "191", "1", "2", "2", "2", "31", " 51 "); // set of virtual users to allow actions

        $ current = time ();
        $ current_different = $ current - $ dis_time;

        $ db -> query ( "DELETE FROM ($ tablepre) sessions WHERE ip1 ='000 'AND lastactivity <=' $ current_different '");

        $ query = $ db -> query ( "SELECT COUNT (*) FROM ($ tablepre) sessions");
        $ onlineuser = $ db -> result ($ query, 0);

        if ($ onlineuser <= $ current_user) (

          $ randguest = mt_rand ($ min_guest, $ max_guest); // visitors
          $ randuser = mt_rand ($ min_user, $ max_user); // Member

          $ query = $ db -> query ( "SELECT fid FROM ($ tablepre) forums WHERE type = 'forum'");
          while ($ fidresult = $ db -> fetch_array ($ query)) (
                   $ fidscope [] = $ fidresult [ 'fid'];
          )

// Random insertion online Member
          for ($ i = 1; $ i <= $ randuser; $ i + +) (

                   $ randtime = mt_rand ($ mintime, $ maxtime);
                   $ onlinetime = $ current - $ randtime;

                   $ randaction = mt_rand (0, count ($ action_arr));
                   $ onlineaction = $ action_arr [$ randaction];

                   $ onlinefid = 0;
                   if ($ onlineaction =='2 ') (
                          $ randfid = mt_rand (0, count ($ fidscope));
                          $ onlinefid = $ fidscope [$ randfid];
                   )
                   $ online_sid = random (6);
                  

                   $ rand_uid = mt_rand ($ start_uid, $ end_uid);
                   $ query = $ db -> query ( "SELECT` uid `,` username `FROM ($ tablepre) members WHERE` uid `= '$ rand_uid'");
                   while ($ row = $ db -> fetch_array ($ query)) (
                          $ db -> query ( "INSERT INTO ($ tablepre) sessions (sid, ip1, groupid, styleid, lastactivity, action, fid, uid, username)
                          VALUES ( '$ online_sid','000 ','10','1 ',' $ onlinetime ',' $ onlineaction ',' $ onlinefid ',' $ row ','$ row ') ");
                   )
          )

// Random insertion online visitors
          for ($ i = 1; $ i <= $ randguest; $ i + +) (
                   $ randtime = mt_rand ($ mintime, $ maxtime);
                   $ onlinetime = $ current - $ randtime;

                   $ randaction = mt_rand (0, count ($ action_arr));
                   $ onlineaction = $ action_arr [$ randaction];

                   $ onlinefid = 0;
                   if ($ onlineaction =='2 ') (
                          $ randfid = mt_rand (0, count ($ fidscope));
                          $ onlinefid = $ fidscope [$ randfid];
                   )
                   $ online_sid = random (6);
                   $ db -> query ( "INSERT INTO ($ tablepre) sessions (sid, ip1, groupid, styleid, lastactivity, action, fid)
                          VALUES ( '$ online_sid','000 ','7','1 ',' $ onlinetime ',' $ onlineaction ',' $ onlinefid')");
          )


        )
)

// Virtual online Member + visitors END

rocjit โพสต์ 2009-5-11 13:19:56

ผมเพิ่มไป แล้วไม่มีอะไรเกิดขึ้นเลยคับ ไม่มีอะไรเลยคับ

ทำไมโค๊ต ที่ให้ เป็นภาษาต่างดาวละคับ
//虚拟在线会员+游客 START



$virtualhack = '1';               // 1=开 0=关



if($virtualhack=='1') {



    $mintime = 500;                // 在线的最小值(秒)

    $maxtime = 800;                // 在线的最大值(秒)

    $dis_time = 810;               // 超过dis_time(秒)删除
หน้า: [1] 2
ดูในรูปแบบกติ: จำลองสมาชิก support Member + visitors