Advertisement
blackhat909

OnlineCountforArch

Mar 17th, 2016
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.57 KB | None | 0 0
  1.  
  2.  
  3.     Online Count Players for Acturus as example for dev...
  4.     Ореn SHO_GS.DLL (HEX) , find http://ruff-rose.com and http://aruarose.com
  5.     Change path
  6.     For an example:
  7.     http://yoursrose.com/mon1.php?server...%d&GL_count=%d
  8.  
  9.     and
  10.     http://yoursrose.com/monitor/monitorn2.php?ip=%s&cnt=%d
  11.  
  12.     Create two scripts:
  13.     mon1.php and monitorn2.php
  14.  
  15.     mon1(thia script log in text file for dev now):
  16.     Code:
  17.  
  18.     <?php
  19.     //*****This monitoring level 1******
  20.  
  21.     //Config----------------------------
  22.     $mysecretfile='secretfilename.txt';
  23.  
  24.     //Data from Server------------------
  25.     $server_ip=$_GET['server_ip'];
  26.     $total_count=$_GET['total_count'];
  27.     $HG_count=$_GET['HG_count'];
  28.     $EX_count=$_GET['EX_count'];
  29.     $BB_count=$_GET['BB_count'];
  30.     $GL_count=$_GET['GL_count'];
  31.  
  32.     //Log in text file-----------------
  33.     $f=fopen($mysecretfile,"a");
  34.     fputs($f, "server_ip-".$server_ip."total_count-".$total_count."HG_count-".$HG_count."EX_count-".$EX_count."BB_count-".$BB_count."GL_count-".$GL_count.' '.date("d.m.Y H:i",time())."\r\n");
  35.     fclose($f);
  36.     //In MSSQL-------------------------
  37.  
  38.     ?>
  39.  
  40.     monitorn2:
  41.     Code:
  42.  
  43.     <?php
  44.     //*****This monitoring level 2******
  45.  
  46.     //Config----------------------------
  47.     $mysecretfile='secretfilename2.txt';
  48.     $myServer = "YOU IP DB";
  49.     $myUser = "USER";
  50.     $myPass = "PASSWD";
  51.     $myDB = "seven_ORA";
  52.     $Channelname="ChannelName";
  53.  
  54.     //Data from Server------------------
  55.     $ip=$_GET['ip'];
  56.     $cnt=$_GET['cnt'];
  57.     //Log in text file-----------------
  58.     $f=fopen($mysecretfile,"a");
  59.     fputs($f, "ip-".$ip." count-".$cnt.' '.date("d.m.Y H:i",time())."\r\n");
  60.     fclose($f);
  61.     //MSSQL-------------------------
  62.     $conn=mssql_connect($myServer,$myUser,$myPass);
  63.     if (!$conn)
  64.       {exit("Connection Failed: " . $conn);}
  65.     $selected = mssql_select_db($myDB, $conn) or die("Couldn't open database $myDB");
  66.     $sql="UPDATE Statistic SET txtChannel =\"$Channelname\", intCount =\"$cnt\"";
  67.     $rs=mssql_query($sql);
  68.     if (!$rs)
  69.     {exit("Error in SQL");}
  70.     mssql_close($conn);
  71.  
  72.     ?>
  73.  
  74.     Note:
  75.     $Channelname="ChannelName" u need open DB seven_ORA->Statistic and add Channelname in txtChannel;
  76.  
  77.     Next
  78.     For RoseCP:
  79.     Open: \libs->rosecp_ae.php and add
  80.  
  81.     Code:
  82.  
  83.     function onlieuser()
  84.     {
  85.     $myServer = "YOU IP DB";
  86.     $myUser = "USERDB";
  87.     $myPass = "PASSWD";
  88.     $myDB = "seven_ORA";
  89.     $conn=mssql_connect($myServer,$myUser,$myPass);
  90.     if (!$conn)
  91.       {exit("Connection Failed: " . $conn);}
  92.     $selected = mssql_select_db($myDB, $conn) or die("Couldn't open database $myDB");
  93.     //echo "You are connected to the " . $myDB . " database on the " . $myServer . ".";
  94.  
  95.     $sql="SELECT txtChannel, intCount FROM Statistic";
  96.     $rs=mssql_query($sql);
  97.     if (!$rs)
  98.       {exit("Error in SQL");}
  99.     while (mssql_fetch_row($rs))
  100.     {
  101.       $channel=mssql_result($rs,0,"txtChannel");
  102.       $playercount=mssql_result($rs,0,"intCount");
  103.  
  104.     }
  105.     mssql_close($conn);
  106.     return "<b>$channel</b> Players- <b>$playercount</b>";
  107.     }
  108.  
  109.         function stats()
  110.         {
  111.        
  112.         $s = '<h2>Server Info</h2>
  113.             <ul>
  114.             <li>Server : '.$this->check_port("127.0.0.1","29000").''.$this->check_port("127.0.0.1","29100").''.$this->check_port("127.0.0.1","29200").'</li>
  115.       <li>Channel: - '.$this->onlieuser().'</li>
  116.     .....
  117.     ......
  118.     .
  119.  
  120.     I hope that it will be to whom that interestingly =)
  121.  
  122.     Code:
  123.  
  124.     5765207374616E64206265747765656E207468652063616E646C6520616E64207468652073746
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement