Mir PHP User Count

Mu online season 21 - grand opening

lifco

Untrusted Member
Legendary
Golden Oldie
Loyal Member
Jul 6, 2004
3,400
66
175
UK/Italy
Does anyone know the php code to show the user count on a server ?

Ive got the login etc working, just need the user count now

thanks


lif
 

Azura

Mir3 Coder & Adviser
Untrusted Member
Golden Oldie
Mar 12, 2005
3,260
116
330
Write a script to show how many connections thru port 3000 on the ip address.
 

lifco

Untrusted Member
Legendary
Golden Oldie
Loyal Member
Jul 6, 2004
3,400
66
175
UK/Italy
I dont know much about it thats way iam asking for help

i echo 3000 but iam missing something, hence the line above

lif
 

Kaori

LOMCN MiR3 Queen!
VIP
Jun 3, 2004
3,584
38
265
Canada
Oh you want the one that can read other server's count? I thought you just want to query something on local server.

I'll email you the code after my lunch.
 

lifco

Untrusted Member
Legendary
Golden Oldie
Loyal Member
Jul 6, 2004
3,400
66
175
UK/Italy
Ive got it all working now but when the server is offline,

instead of showing the red dot, i get this message

Warning: fsockopen() [function.fsockopen]: unable to connect to xx.xxx.xxx.xxx:7000 (A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. )

Online is fine

Any idears ?

lif
 

Primal

LOMCN VIP
VIP
Jun 28, 2004
1,756
102
289
Ive got it all working now but when the server is offline,

instead of showing the red dot, i get this message

Warning: fsockopen() [function.fsockopen]: unable to connect to xx.xxx.xxx.xxx:7000 (A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. )

Online is fine

Any idears ?

lif

put this at the top of the php script after the <? php

error_reporting(E_ERROR);

e.g.
PHP:
<? php
error_reporting(E_ERROR);
// usercount code etc here
?>