Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Rappelz > Rappelz Private Server
You last visited: Today at 23:21

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

Advertisement



[help] how to echo online players

Discussion on [help] how to echo online players within the Rappelz Private Server forum part of the Rappelz category.

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 06/07/2015, 14:14   #2
 
elite*gold: 0
Join Date: Jul 2014
Posts: 14
Received Thanks: 1
I NEED THIS 2
senpai65 is offline  
Thanks
1 User
Old 06/07/2015, 14:20   #3
Moderator


 
ThunderNikk's Avatar
 
elite*gold: 1
Join Date: Dec 2012
Posts: 4,785
Received Thanks: 1,463
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 06/08/2015, 01:41   #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 06/08/2015, 02:23   #5
Moderator


 
ThunderNikk's Avatar
 
elite*gold: 1
Join Date: Dec 2012
Posts: 4,785
Received Thanks: 1,463
No I can't I am not a web developer.
ThunderNikk is offline  
Old 06/08/2015, 08:00   #6
 
TheSuperKiller's Avatar
 
elite*gold: 0
Join Date: Apr 2011
Posts: 278
Received Thanks: 73
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 06/08/2015, 10:26   #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 06/08/2015, 11:14   #8


 
CHlNAMAN's Avatar
 
elite*gold: 99
Join Date: Jun 2015
Posts: 274
Received Thanks: 108
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
CHlNAMAN is offline  
Thanks
2 Users
Old 06/10/2015, 22:07   #9
 
elite*gold: 0
Join Date: Sep 2013
Posts: 41
Received Thanks: 1
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 06/10/2015, 22:46   #10


 
CHlNAMAN's Avatar
 
elite*gold: 99
Join Date: Jun 2015
Posts: 274
Received Thanks: 108
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.
CHlNAMAN is offline  
Old 06/10/2015, 23:40   #11
 
elite*gold: 0
Join Date: Apr 2012
Posts: 99
Received Thanks: 35
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 06/11/2015, 10:48   #12
 
elite*gold: 0
Join Date: Sep 2013
Posts: 41
Received Thanks: 1
Thanks you very mush brother !!!!!
FlyffResu is offline  
Old 06/11/2015, 19:35   #13
 
elite*gold: 0
Join Date: Apr 2012
Posts: 99
Received Thanks: 35
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 06/11/2015, 20:26   #14
 
elite*gold: 0
Join Date: Sep 2013
Posts: 41
Received Thanks: 1
I need classement fonctionnal
FlyffResu is offline  
Old 06/11/2015, 20:35   #15
 
elite*gold: 0
Join Date: Apr 2012
Posts: 99
Received Thanks: 35
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




All times are GMT +2. The time now is 23:21.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.