daily pastebin goal
41%
SHARE
TWEET

Untitled

a guest Jun 5th, 2017 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. $host = 'localhost';    // Host adress
  3. $user = 'root';         //username for MySQL
  4. $password = 'jelszó';  //password
  5. $realmdb = 'wow';       //Realmd Database
  6. $charactersdb = 'wow';  // Characters Database
  7. $world_db = 'wow';      //Mangos Database
  8.  
  9.  
  10. /*                  Text Settings               */
  11. $realmname='Szaerver';      //Realm name if only 1 realm
  12. $realmadress='localhost';   //realmlist ip address
  13. $patch='3.3.2';             // Your Server supported patch
  14. $serverport = "8121";       // Your server PORT
  15.  
  16.  
  17.  
  18.     $conn = mysql_connect($host,$user,$password) or die(mysql_error());
  19.     mysql_select_db($charactersdb) or die(mysql_error());
  20.    
  21.     $numonline=@mysql_num_rows(mysql_query("SELECT NULL FROM `characters` WHERE `online`='1'"));
  22.    
  23.     $qry = "
  24.             SELECT * FROM characters WHERE
  25.              `race` = '1' AND `online` = '1' OR
  26.              `race` = '3' AND `online` = '1' OR
  27.              `race` = '4' AND `online` = '1' OR
  28.              `race` = '7' AND `online` = '1' OR
  29.              `race` = '11' AND `online` = '1';
  30.             ";
  31.     $ally = mysql_num_rows(mysql_query($qry));
  32.  
  33.  
  34.     $qry = "
  35.             SELECT * FROM characters WHERE
  36.              `race` = '2' AND `online` = '1' OR
  37.              `race` = '5' AND `online` = '1' OR
  38.              `race` = '6' AND `online` = '1' OR
  39.              `race` = '8' AND `online` = '1' OR
  40.              `race` = '10' AND `online` = '1';
  41.             ";
  42.     $horde = mysql_num_rows(mysql_query($qry));
  43.  
  44.  
  45.     // Lets see if Realm 1 is alive
  46.     echo "<p align='center'>";
  47.         $fp = @fsockopen ($ip,$serverport,$errno,$errstr, 0.5);
  48.         if($fp)
  49.         {
  50.             print "</font><p><img src='images/downarrow2.gif'>";
  51.         }
  52.         else
  53.         {
  54.             print "<img src='images/uparrow2.gif'>";
  55.         }
  56.         @fclose($fp);
  57.     echo "</p>";
  58.     mysql_close($conn);
  59.    
  60.     $conn = mysql_connect($host,$user,$password) or die(mysql_error());
  61.     mysql_select_db($realmdb) or die(mysql_error());
  62.    
  63.    
  64.     echo "
  65.         <p align='center'><font color:'gold'>
  66.         <font color='green'>
  67.             <b>
  68.                 <u>
  69.                     Online Players:".$numonline."
  70.                 </u>
  71.             </b>
  72.         </font>
  73.        
  74.         <br/><br/>
  75.        
  76.         <b>Alliance :</b>
  77.         <font color='blue'>".$ally."</font>
  78.         <b>Horde :</b>
  79.         <font color='red'>".$horde."</font>
  80.         <br><br></p>
  81.         </p>
  82.     ";
  83. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top