PHP Script for __ Players Online

Results 1 to 5 of 5
  1. #1
    Proficient Member icey360 is offline
    MemberRank
    Sep 2007 Join Date
    UnknownLocation
    159Posts

    PHP Script for __ Players Online

    Hey =]
    Im Requesting a PHP script for (Number) Players online.

    Thanks


  2. #2
    Proficient Member icey360 is offline
    MemberRank
    Sep 2007 Join Date
    UnknownLocation
    159Posts

    Re: PHP Script for __ Players Online

    /bump

  3. #3
    Apprentice Teclis is offline
    MemberRank
    Oct 2008 Join Date
    United StatesLocation
    20Posts

    Re: PHP Script for __ Players Online

    This will be at the left side of the page... if you want to adjust placement and colors do it urself

    Code:
    <style type="text/css">
    <!--
    body {
    	background-color: #cbcbcb;
    }
    -->
    </style>
    <body style="background-color: #1F3A56" text="#CBCBCB">
    
    <font size="1" face="Arial">
    <?php
    $host="YourServerNameHere\SQLEXPRESS";  //Server name for connect to your database
    $username="sa"; //The name of your account security 
    $password="YourPWHere"; //The password of your account security 
    $conn = mssql_connect($host,$username,$password);
    $DB = "GunzDB"; //The name of your database default is GunzDB
    mssql_select_db($DB); 
    //Total Accounts
    $query = mssql_query("SELECT * FROM Account"); 
    $num_rows = mssql_num_rows($query); 
    echo "Total Accounts: ".$num_rows."<n>
    <p>"; 
     
    ?> </p>
    
    </p>
    <?php
     
    //Total Characters
    $query = mssql_query("SELECT * FROM Character"); 
    $num_rows = mssql_num_rows($query); 
    echo "Total Characters: ".$num_rows."<n>";
    
    ?>
    
    </p>
    </font>
    <?php
    
    //Total Players , Begin in 0 and end to 200 its the limit
    $query = mssql_query("SELECT TOP 1 * FROM ServerStatus"); 
    $row = mssql_fetch_row($query); 
    $players = $row[1]; 
    echo "Players online: $players / 1000"; 
    
    ?>

  4. #4
    Account Upgraded | Title Enabled! Bartjehh is offline
    MemberRank
    Oct 2008 Join Date
    The netherlandsLocation
    448Posts

    Re: PHP Script for __ Players Online

    Quote Originally Posted by Teclis View Post
    This will be at the left side of the page... if you want to adjust placement and colors do it urself

    Code:
    <style type="text/css">
    <!--
    body {
    	background-color: #cbcbcb;
    }
    -->
    </style>
    <body style="background-color: #1F3A56" text="#CBCBCB">
    
    <font size="1" face="Arial">
    <?php
    $host="YourServerNameHere\SQLEXPRESS";  //Server name for connect to your database
    $username="sa"; //The name of your account security 
    $password="YourPWHere"; //The password of your account security 
    $conn = mssql_connect($host,$username,$password);
    $DB = "GunzDB"; //The name of your database default is GunzDB
    mssql_select_db($DB); 
    //Total Accounts
    $query = mssql_query("SELECT * FROM Account"); 
    $num_rows = mssql_num_rows($query); 
    echo "Total Accounts: ".$num_rows."<n>
    <p>"; 
     
    ?> </p>
    
    </p>
    <?php
     
    //Total Characters
    $query = mssql_query("SELECT * FROM Character"); 
    $num_rows = mssql_num_rows($query); 
    echo "Total Characters: ".$num_rows."<n>";
    
    ?>
    
    </p>
    </font>
    <?php
    
    //Total Players , Begin in 0 and end to 200 its the limit
    $query = mssql_query("SELECT TOP 1 * FROM ServerStatus"); 
    $row = mssql_fetch_row($query); 
    $players = $row[1]; 
    echo "Players online: $players / 1000"; 
    
    ?>

    Nice, Thanks You very much! Happy new year toooo!!

  5. #5
    Proficient Member icey360 is offline
    MemberRank
    Sep 2007 Join Date
    UnknownLocation
    159Posts

    Re: PHP Script for __ Players Online

    Ty man. And Happy New Years Everyone!!! WOOT



Advertisement