Advertisement
Guest User

Untitled

a guest
Oct 31st, 2014
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.03 KB | None | 0 0
  1. <?php
  2. @session_start();
  3. error_reporting('0');
  4.  
  5. // Preferências do script
  6. $segundos = 10; // ajuste aqui os segundos que a página irá atualizar
  7. $milisegundos = 10000; // esse valor é igual a 10 segundos. Ou seja, a cada 10 segundos x 1000 = milisegundos. 20 segundos = 20000 e assim em diante
  8. $script_nome = "Identificador automático de usuários online"; // defina o nome do script
  9.  
  10. // Pega a página e transforma em inteiro
  11. function transform_int($url) {
  12. $pagina = file_get_contents($url);
  13. preg_match_all('!\d+!', $pagina, $matches);
  14. if (isset($matches[0][1])) {
  15. return $matches[0][1];
  16. }elseif (isset($matches[0][0])){
  17. return $matches[0][0];
  18. }else{
  19. return $matches[0];
  20. }
  21. }
  22.  
  23. // configurando hoteis
  24. $contador[habblet] = transform_int('http://habblet.habbo.net/inc/class.contador.php');
  25. $contador[habbinfo] = transform_int('http://habblet.crazzy.info/inc/class.contador.php');
  26. $contador[hablitz] = transform_int('http://lella.la/inc/class.contador.php');
  27. $contador[hapixel] = transform_int('http://hapixel.crazzy.org/inc/class.contador.php');
  28. $contador[lella] = transform_int('http://hablitz.crazzy.net/inc/class.contador.php');
  29.  
  30. ini_set('user_agent','googlebot');
  31. $html = file_get_contents('http://www.habbo.com.br/community');
  32. $str1 = explode("<div id=\"habbos-online\"><div class=\"rounded\"><span>", $html);
  33. $str2 = explode("</span></div></div>", $str1[1]);
  34. $str3 = explode("Habbos no Hotel", $str2[0]);
  35.  
  36. $habbo1 = str_ireplace(",", "", $str3[0]);
  37. $habbo = number_format($habbo1,0,",",",");
  38.  
  39. $total = number_format(array_sum($contador),0,",",",");
  40. ?>
  41. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  42. <html xmlns="http://www.w3.org/1999/xhtml">
  43. <head>
  44. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  45. <title><?php echo($script_nome); ?></title>
  46. <link href='http://fonts.googleapis.com/css?family=Ubuntu' rel='stylesheet' type='text/css'>
  47. <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
  48. <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
  49. <style>
  50. *{
  51. padding:0;
  52. margin:0;
  53. font-family: 'Ubuntu', sans-serif;
  54. }
  55.  
  56. a {
  57. color: blue;
  58. }
  59.  
  60. a visited{
  61. color: #fff;
  62. }
  63.  
  64. tr, td {width:33%; padding:4px}
  65.  
  66. </style>
  67. <script>
  68. $(document).ready(function(){
  69. setTimeout("location.href='index.php'", <?php echo($milisegundos); ?>);
  70. });
  71. </script>
  72. </head>
  73. <body>
  74. <div class="conteudo">
  75. <br>
  76. <center><img src="http://uptime.crazzy.com/EquipeCrazzY.png" alt="" /></center>
  77. <br>
  78. <h1 align="middle" style="font-size:18px;">Este contador atualiza automaticamente em <b><?php echo($segundos); ?></b> segundos com os status dos servidores da EquipeCrazzY e Parceiros!</h1>
  79. <br>
  80. <hr>
  81. <div class="hoteis" style="margin:15px auto 0 auto; width: 90%;">
  82. <table width="100%">
  83. <tr>
  84. <td><img src="/br.png" alt="" />&nbsp;Habblet: <b><u><?php echo($contador[habblet]); ?></u></b> onlines.</td>
  85. <td><img src="/br.png" alt="" />&nbsp;Habbinfo: <b><u><?php echo($contador[habbinfo]); ?></u></b> onlines.</td>
  86. <td><img src="/br.png" alt="" />&nbsp;Hablitz: <b><u><?php echo($contador[hablitz]); ?></u></b> onlines.</td>
  87. </tr>
  88. <tr>
  89. <td><img src="/br.png" alt="" />&nbsp;Hapixel: <b><u><?php echo($contador[hapixel]); ?></u></b> onlines.</td>
  90. <td><img src="/br.png" alt="" />&nbsp;LellaHotel: <b><u><?php echo($contador[lella]); ?></u></b> onlines.</td>
  91. </tr>
  92. </table>
  93. <br>
  94. <br>
  95. <hr>
  96. <br>
  97. <center>
  98. <table>
  99. <tr>
  100. <?php
  101. $total_numerico = array_sum($contador);
  102.  
  103. if (isset($_SESSION['equipecrazzy'])) {
  104. $diferenca_equipecrazzy = $total_numerico-$_SESSION['equipecrazzy'];
  105. if ($_SESSION['equipecrazzy'] > $total_numerico) {
  106. $equipecrazzy_r = "<img src='http://i.imgur.com/GoF8NSv.png' /> ".$diferenca_equipecrazzy;
  107. }elseif ($_SESSION['equipecrazzy'] < $total_numerico) {
  108. $equipecrazzy_r = "<img src='http://i.imgur.com/6EjfxZe.png' /> ".$diferenca_equipecrazzy;
  109. }else{
  110. $equipecrazzy_r = "<img src='http://i.imgur.com/YWxqBPZ.png' /> ".$diferenca_equipecrazzy;
  111. }
  112. }
  113.  
  114. if (isset($_SESSION['habbo'])) {
  115. $diferenca_habbo = $habbo1-$_SESSION['habbo'];
  116. if ($_SESSION['habbo'] > $habbo1) {
  117. $habbo_r = "<img src='/down.png' /> ".$diferenca_habbo;
  118. }elseif ($_SESSION['habbo'] < $habbo1) {
  119. $habbo_r = "<img src='/up.png' /> ".$diferenca_habbo;
  120. }else{
  121. $habbo_r = "<img src='/neutro.png' /> ".$diferenca_habbo;
  122. }
  123. }
  124.  
  125. $diferenca = $total_numerico-$habbo1;
  126.  
  127. if (isset($_SESSION['diferenca'])) {
  128. $diferenca_concorrencia = $diferenca-$_SESSION['diferenca'];
  129. if ($_SESSION['diferenca'] > $diferenca) {
  130. $diferencia_r = "<img src='http://i.imgur.com/6EjfxZe.png' /> ".$diferenca_concorrencia;
  131. }elseif ($_SESSION['diferenca'] < $diferenca) {
  132. $diferencia_r = "<img src='http://i.imgur.com/GoF8NSv.png' /> ".$diferenca_concorrencia;
  133. }else{
  134. $diferencia_r = "<img src='http://i.imgur.com/YWxqBPZ.png' /> ".$diferenca_concorrencia;
  135. }
  136. }
  137. ?>
  138. <td><center>Total de onlines EquipeCrazzY: <br /> <h1><strong><?php echo($total); ?></strong></h1> <?php echo $equipecrazzy_r; ?></center></td>
  139. <td><center>Diferen&ccedil;a: <br /> <h1><strong><?php echo($diferenca); ?></strong></h1> <?php echo $diferencia_r; ?></center></td>
  140. <td><center>Total de onlines HabboBR: <br /> <h1><strong><?php echo($habbo); ?></strong></h1> <?php echo $habbo_r; ?></center></td>
  141. </tr>
  142. </table>
  143. <strong>Usuarios Onlines Simultaneos:</strong> <script id="_waukwb">var _wau = _wau || []; _wau.push(["small", "k8lvxyq45tkd", "kwb"]);(function() { var s=document.createElement("script"); s.async=true; s.src="http://widgets.amung.us/small.js";document.getElementsByTagName("head")[0].appendChild(s);})();</script>
  144. <br>
  145. <br>
  146. <strong>Carga do Server Linux:</strong> <img src="http://uptime.crazzy.com.br/images/dynamic/small.php" align="absmiddle">
  147. </center>
  148. </div>
  149. </div>
  150. </body>
  151. </html>
  152. <?php
  153. $_SESSION['habbo'] = $habbo1;
  154. $_SESSION['equipecrazzy'] = $total_numerico;
  155. $_SESSION['diferenca'] = $diferenca;
  156. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement