Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Rappelz > Rappelz Private Server
You last visited: Today at 16:50

  • Please register to post and access all features, it's quick, easy and FREE!

 

[help] how to echo online players

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Aug 2014
Posts: 6
Received Thanks: 0
Exclamation [help] how to echo online players

hi !
as the title says !! i want to echo the number of online player on My Server in my site ... i need the code to do that , please !



kdevilaa is offline  
Old   #2
 
elite*gold: 0
Join Date: Jul 2014
Posts: 14
Received Thanks: 1
I NEED THIS 2


senpai65 is offline  
Thanks
1 User
Old   #3
Moderator
 
elite*gold: 1
Join Date: Dec 2012
Posts: 3,005
Received Thanks: 961
There is a help thread for help questions...



Please use it and stop contributing to the mess that our section is in.

Code:
SELECT COUNT(*) AS "Number of players"
FROM telecaster.dbo.character
WHERE login_time > logout_time;
That is a query, how to put it into your web site scripting is on you or somebody else.
ThunderNikk is offline  
Old   #4
 
elite*gold: 0
Join Date: Aug 2014
Posts: 6
Received Thanks: 0
i couldn't make it !! please can u give me the full code ^^"


kdevilaa is offline  
Old   #5
Moderator
 
elite*gold: 1
Join Date: Dec 2012
Posts: 3,005
Received Thanks: 961
No I can't I am not a web developer.
ThunderNikk is offline  
Old   #6
 
elite*gold: 0
Join Date: Apr 2011
Posts: 273
Received Thanks: 69
for in-game
Hints : get_env , notice , game.user_count
Search , learn and you will make it , you job is to assemble the hints.
-------------------------
for web, as @thndr said.
TheSuperKiller is offline  
Old   #7
 
elite*gold: 0
Join Date: Aug 2014
Posts: 6
Received Thanks: 0
i know how to do it in the game !
i just need to know how to do it in Web why wouldn't you guyz help me ?
kdevilaa is offline  
Old   #8
 
elite*gold: 0
Join Date: Jun 2015
Posts: 100
Received Thanks: 45
thndr already gave you a fully working query to achieve that..

Here's my two cents.

ASPX.NET:

Code:
        Using saConn As New SqlConnection(Database connection info)
            Dim Q As String = Nothing
            Q = "SELECT COUNT(*) AS 'Count' FROM [Telecaster].[dbo].[Character] WHERE login_time > logout_time"
            Dim cmd As New SqlCommand(Q, saConn)

            saConn.Open()
            Using saReader As SqlDataReader = cmd.ExecuteReader()
                While saReader.Read()
                    Return saReader("Count")
                End While
            End Using
            saConn.Close()
        End Using
Leqendary is offline  
Thanks
2 Users
Old   #9
 
elite*gold: 0
Join Date: Sep 2013
Posts: 41
Received Thanks: 0
Good evening would it be possible to explain how to make an echo in php.
I can not create a php mssql connection and to execute a query and my php script shows me the nickname.

Is it possible to show me an example?
----------------------------------------------------------------------------
Bonsoir serait il possible de m'expliquer comment faire un echo en php.
Je ne n'arrive pas a créer de connexion mssql et php pour executer un query et que mon script php me montre le pseudo.

Serait il possible de me montré un exemple ?
FlyffResu is offline  
Old   #10
 
elite*gold: 0
Join Date: Jun 2015
Posts: 100
Received Thanks: 45
PHP Code:
<?php
$servername 
"localhost";
$username "username";
$password "password";
$dbname "myDB";

// Create connection
$conn = new mysqli($servername$username$password$dbname);
// Check connection
if ($conn->connect_error) {
    die(
"Connection failed: " $conn->connect_error);
}

$sql "SELECT COUNT(*) AS 'Count' FROM [Telecaster].[dbo].[Character] WHERE login_time > logout_time";
$result $conn->query($sql);

if (
$result->num_rows 0) {
    while(
$row $result->fetch_assoc()) {
        echo 
$row["Count"];
    }
} else {
    echo 
"0";
}
$conn->close();
?>
I am not familiar with PHP, but a simple google and a little of my own thinking came up with that.
Leqendary is offline  
Old   #11
 
elite*gold: 0
Join Date: Apr 2012
Posts: 99
Received Thanks: 34
hy , i use iis 7.5 with php 5.6.2 and for sql server , mssql functions not working .
you need to instal the good unofficial_sql_server_driver for php for your php version.

this the link of my driver for iis and php i use :


just unrar it , put the 2 files in your php/ext folder and add these 4 rows in your php.ini :

[PHP_PDO_SQLSRV_56_NTS]
extension=php_pdo_sqlsrv_56_nts.dll
[PHP_SQLSRV_56_NTS]
extension=php_sqlsrv_56_nts.dll

reboot iis and check if the install as ok with php manager
link for php manager if you don't have it:


and this an example of php function to sql server:

this the base y use to create my website AccountCreator , it's working but need more work for security .

you can use this example for the sql_server php functions after have modded it to your idea .

link to the php sql_server Library:


good night all
nimoht is offline  
Old   #12
 
elite*gold: 0
Join Date: Sep 2013
Posts: 41
Received Thanks: 0
Thanks you very mush brother !!!!!
FlyffResu is offline  
Old   #13
 
elite*gold: 0
Join Date: Apr 2012
Posts: 99
Received Thanks: 34
No problem , i search a lot when i make the Account Creator for this, it's not very easy to fund .
nimoht is offline  
Old   #14
 
elite*gold: 0
Join Date: Sep 2013
Posts: 41
Received Thanks: 0
I need classement fonctionnal
FlyffResu is offline  
Old   #15
 
elite*gold: 0
Join Date: Apr 2012
Posts: 99
Received Thanks: 34
lol , don't know ; order by lvl ?

use telecaster
select top 10 name, lv from character order by lv desc

this the start for your work.
you need to adapt it to use with php,
and to show the values in your web page.


nimoht is offline  
Reply



« Previous Thread | Next Thread »



All times are GMT +2. The time now is 16:50.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy
Copyright ©2017 elitepvpers All Rights Reserved.