[REQUEST] online players script

10/03/2008 19:16 PowerChaos#1
hi all ,

i think that the titel says enouf of what i want to aks , but to be shure i goin write a little more ^^

i aim looking for a script whit a few things
  • server offline
    server online
    players online

if posseble it need to be in php :S

i searched the forum already for it and coulnd find it

Thank you for your help and
Greets From The Crasher
10/03/2008 19:22 Rawsteeey#2
its status.php
10/03/2008 21:25 Kradel#3
Way to go, netlog_stefan, way to go. :P

Those files are, most recently, included in [Only registered and activated users can see links. Click Here To Register...] There are a handful of other useful things in there too, as our friend NecroN has kindly broken the non-release barrier. :)

I attached a copy of it, as well as the config.php file you'll need to edit to make it work.

I obtained the files from NecroN collection above, but I don't know for sure who wrote the original.
10/03/2008 21:47 Spy520#4
Quote:
Originally Posted by Kradel View Post
Way to go, netlog_stefan, way to go. :P

Those files are, most recently, included in [Only registered and activated users can see links. Click Here To Register...] There are a handful of other useful things in there too, as our friend NecroN has kindly broken the non-release barrier. :)

I attached a copy of it, as well as the config.php file you'll need to edit to make it work.

I obtained the files from NecroN collection above, but I don't know for sure who wrote the original.
I tried them alot but they say Online Players : 0 and dont increase:confused:
10/03/2008 23:12 PowerChaos#5
Thank you for helping me

but he is right , i got a few players online and it shows 0 players online

i got a few accounts and it shows 2 accounts

but for the rest it seems to be working :) (i downloaded the other release , some bugs are there fixed )

i think i figured out where the problem is
from the moment i takes a look at the script then i saw that the table where he is looking is missing by me ( table "online" )

Thank you again

Greets From The Crasher
10/03/2008 23:29 Spy520#6
Quote:
Originally Posted by The Crasher View Post
Thank you for helping me

but he is right , i got a few players online and it shows 0 players online

i got a few accounts and it shows 2 accounts

but for the rest it seems to be working :) (i downloaded the other release , some bugs are there fixed )

i think i figured out where the problem is
from the moment i takes a look at the script then i saw that the table where he is looking is missing by me ( table "online" )

Thank you again

Greets From The Crasher
Hey dude online players dont need any table Forecer told me before that i have to run a program called netstat but idk how to fix it :S
10/03/2008 23:53 Spy520#7
I got the way from forcer
1st open run ---> cmd ---> type in cmd
netstat -a -n |find "5816" |find "ESTABLISHED" /c
then see the status page it will count the online players if it failed so type in cmd
netstat -a -n |find "9988" |find "ESTABLISHED" /c
or
netstat -a -n |find "8899" |find "ESTABLISHED" /c
If you wana thank me so you must thank Forcer 1st
10/04/2008 00:23 forcer#8
Quote:
Originally Posted by Spy520 View Post
I got the way from forcer
1st open run ---> cmd ---> type in cmd
netstat -a -n |find "5816" |find "ESTABLISHED" /c
then see the status page it will count the online players if it failed so type in cmd
netstat -a -n |find "9988" |find "ESTABLISHED" /c
or
netstat -a -n |find "8899" |find "ESTABLISHED" /c
If you wana thank me so you must thank Forcer 1st
this will not update any pages. you will need to exec this code and read output like this:

PHP Code:
Online Players: <b><?php echo (exec('netstat -a -n |find "5816"  |find "ESTABLISHED" /c')-2); ?></b><br />
adding this to your index.php should show Online players.

and message for ACE guys: stop being a copy & paste morons and invent something. I'm sick of your constant copying of everything from acme
10/04/2008 00:55 Spy520#9
Quote:
Originally Posted by forcer View Post
this will not update any pages. you will need to exec this code and read output like this:

PHP Code:
Online Players: <b><?php echo (exec('netstat -a -n |find "5816"  |find "ESTABLISHED" /c')-2); ?></b><br />
adding this to your index.php should show Online players.

and message for ACE guys: stop being a copy & paste morons and invent something. I'm sick of your constant copying of everything from acme
And if you failed this is small example

Code:
<? 
require("config.php");
?>
<STYLE type='text/css'>
body
{
	FONT: 13px Arial;
}
td
{
	FONT: 13px Arial;
}
.Label1 {
	TEXT-ALIGN: right
}
.Label {
	PADDING-LEFT: 5px
}
.Label1 {
	PADDING-LEFT: 5px
}
.Label {
	PADDING-BOTTOM: 16px; FONT: 13px Arial; VERTICAL-ALIGN: top! important; WIDTH: 100px; COLOR: #000; WHITE-SPACE: nowrap
}
.it {
	WIDTH: 160px
}
#ipassword {
	WIDTH: 160px
}
#ipassword2 {
	WIDTH: 160px
}
.it3 {
	VERTICAL-ALIGN: top; WIDTH: 160px
}
.it1 {	WIDTH: 160px
}
.Butt {
	BORDER-RIGHT: #2854a7 1px solid; BORDER-TOP: #7cbaff 1px solid; FONT: bold 12px Arial, Helvetica, sans-serif; BORDER-LEFT: #7cbaff 1px solid; COLOR: #ffffff; BORDER-BOTTOM: #2854a7 1px solid; BACKGROUND-COLOR: #3366cc
}
</STYLE>
<td align="left"><p><?php
			mysql_select_db();
			 = mysql_query("SELECT count(*) FROM account;");
			 = mysql_fetch_array();
			echo "Total Accounts: ".."<br />";
			
			mysql_select_db();
			 = mysql_query("SELECT count(*) FROM cq_user;");
			 = mysql_fetch_array();
			echo "Total Characters: ".."<br />";



			
			echo "Server Status: ";
			 = @fsockopen(, , , , 1);
			if (!) {
				echo "<font style='color: #FF3300'><B>Offline</B></font></br>";
			}
			else
			{
				echo "<font style='color: #009933'><B>Online</B></font></br>";
				fclose();
			}
			?>
Online Players: <b><?php echo (exec('netstat -a -n |find "5816"  |find "ESTABLISHED" /c')-2); ?></b><br />
10/04/2008 01:17 Kradel#10
Quote:
Originally Posted by forcer View Post
and message for ACE guys: stop being a copy & paste morons and invent something. I'm sick of your constant copying of everything from acme
Are you talking about me? :\
10/04/2008 03:06 PowerChaos#11
Thank you forcer , it works now :)
10/04/2008 04:39 Just_Me99999#12
Quote:
Originally Posted by Spy520 View Post
And if you failed this is small example

Code:
<? 
require("config.php");
?>
<STYLE type='text/css'>
body
{
	FONT: 13px Arial;
}
td
{
	FONT: 13px Arial;
}
.Label1 {
	TEXT-ALIGN: right
}
.Label {
	PADDING-LEFT: 5px
}
.Label1 {
	PADDING-LEFT: 5px
}
.Label {
	PADDING-BOTTOM: 16px; FONT: 13px Arial; VERTICAL-ALIGN: top! important; WIDTH: 100px; COLOR: #000; WHITE-SPACE: nowrap
}
.it {
	WIDTH: 160px
}
#ipassword {
	WIDTH: 160px
}
#ipassword2 {
	WIDTH: 160px
}
.it3 {
	VERTICAL-ALIGN: top; WIDTH: 160px
}
.it1 {	WIDTH: 160px
}
.Butt {
	BORDER-RIGHT: #2854a7 1px solid; BORDER-TOP: #7cbaff 1px solid; FONT: bold 12px Arial, Helvetica, sans-serif; BORDER-LEFT: #7cbaff 1px solid; COLOR: #ffffff; BORDER-BOTTOM: #2854a7 1px solid; BACKGROUND-COLOR: #3366cc
}
</STYLE>
<td align="left"><p><?php
			mysql_select_db();
			 = mysql_query("SELECT count(*) FROM account;");
			 = mysql_fetch_array();
			echo "Total Accounts: ".."<br />";
			
			mysql_select_db();
			 = mysql_query("SELECT count(*) FROM cq_user;");
			 = mysql_fetch_array();
			echo "Total Characters: ".."<br />";



			
			echo "Server Status: ";
			 = @fsockopen(, , , , 1);
			if (!) {
				echo "<font style='color: #FF3300'><B>Offline</B></font></br>";
			}
			else
			{
				echo "<font style='color: #009933'><B>Online</B></font></br>";
				fclose();
			}
			?>
Online Players: <b><?php echo (exec('netstat -a -n |find "5816"  |find "ESTABLISHED" /c')-2); ?></b><br />

Bad example.
People can flood with those useless queries.
And css part? Copy & paste?
Don't put all queries in same page.

No hard feelings, but try to separate them.
10/05/2008 01:45 PowerChaos#13
hehe
i just needed the basic of it to let the online players to showing
becosue i aim making my own kind of script (or let me say , i aim editing the script so its better to what i want ^^ )

to see a previeuw so far, then go to [Only registered and activated users can see links. Click Here To Register...]

Thank you all so far from helping me out :)
all credits goes to the providers of the scripts (and the persones who i got the codes from becouse most of them are from them

Greets From The Crasher
10/05/2008 03:32 Just_Me99999#14
Quote:
Originally Posted by The Crasher View Post
hehe
i just needed the basic of it to let the online players to showing
becosue i aim making my own kind of script (or let me say , i aim editing the script so its better to what i want ^^ )

to see a previeuw so far, then go to [Only registered and activated users can see links. Click Here To Register...]

Thank you all so far from helping me out :)
all credits goes to the providers of the scripts (and the persones who i got the codes from becouse most of them are from them

Greets From The Crasher
Nice!
Cut off list about max 50 (less stress to your server)
Remove PMs from list...its not fair to players to show how much PMs own Eps.
10/05/2008 04:33 PowerChaos#15
hmm , i aim now buzzy whit inplenting the legion members and so on , but if i can find a way to remove the pm out of it then i will do it :)

but i cant find a way at this moment to do it (dont know how to start whit it :S )

then a small update , the pm you see on top need to be deleted :P its just a test account ^^

Greets From The Crasher