Need the easy way to get...

budyniowski

Dedicated Member
Dedicated Member
Dec 16, 2007
149
0
63
Warsaw, Poland
user count in php on my website. I try to use usercount from kaori ams but its to complicated for me. Now i have server status (show only online or offline) . Can someone post count script 4 me? :>
thanks, Budyniowski.
 

Inflikted

LOMCN Veteran
Veteran
Aug 4, 2003
256
7
114
i think kaori's ams.. is as easy as it gets :) i suggest trying to get the entire script to work.. then trim it down to get the user count, isnt very hard if you no basic cut/paste skills hehe.. or you can use kaori's user count image thingy.. or you can use Ida's usercount program -> http://sting3g.com/downloads.php
 
  • Like
Reactions: budyniowski
Upvote 0

budyniowski

Dedicated Member
Dedicated Member
Dec 16, 2007
149
0
63
Warsaw, Poland
Ok so tell me why kaori ams cant connect to my msql server?
I have blank results on "Statistic" page and "Market" and "Account was not created. Server encountered an error while processing your info. Please re-register." error when i try create new account.what is wrong with my configuration?
 
Upvote 0

Inflikted

LOMCN Veteran
Veteran
Aug 4, 2003
256
7
114
well if you are hosting this site outside your dedicated server.. you probably did not open the right outside IP address to allow access to the information. there are many ways to get a mir3 server working.. even with the wrong open ports, and wrong local/outside IP addresses lol :)

and if you cant figure that out.. and simply just want a usercount display, then i suggest using ida's user count. its pretty easy to use, and allows for customize image/fonts.
 
Upvote 0

budyniowski

Dedicated Member
Dedicated Member
Dec 16, 2007
149
0
63
Warsaw, Poland
Thx for help m8 ;p I put ams on same mashine like server and now work ;p
I found this :
<?php

$errno = 0;
$error = "";
$num = 0;
$ptr = fsockopen("server ip",3000,&$errno,&$error,3);
$data = fgets ( $ptr, 40 );
list ( ,, $data_text, ) = preg_split ( "/\s*;/", $data, 4 );
list ( $name,, $num, $ok ) = preg_split ( "/\//", $data_text );

if ($num > 0)
{
$content = "<center>";
$content .= "Server: " . $name . "<br />";
$content .= "ppl online: " . $num . "<br />";
$content .= "Status: " . ( $ok == "GOOD" ? "Offline" : "Online" ) . "<br />";
echo $content .= "Current Exp: x1" . "</center>";
}

else
{
$content = "<center>";
$content .= "Server: ServerName" . "<br />";
$content .= "ppl online: 0" . "<br />";
$content .= "Status: Down" . "<br />";
echo $content .= "Current Exp: x1" . "</center>";
}

?>
 
Last edited:
Upvote 0