Jump to content

server status

- - - - -

  • Please log in to reply
7 replies to this topic

#1
Meister511

Meister511

    Newbie

  • Members
  • PipPip
  • 10 posts
Is it possible to read game server status? If i have server ip can i get informations so i can put on web like:
server status ON/OFF
server poularity 500/3000


#2
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others
Yes, but it will vary from game to game. Getting game server stats for OpenArena would be much easier than for World of Warcraft, for example.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#3
Meister511

Meister511

    Newbie

  • Members
  • PipPip
  • 10 posts
hmm,is there php script where i can download it so i can just edit ip? i dont know whats needed to edit if its ip/port that should be easy.

#4
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others
It is COMPLETELY different from one game to the next. Since you haven't specified the game, no one can give you helpful advice.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#5
Meister511

Meister511

    Newbie

  • Members
  • PipPip
  • 10 posts
Game is called Tera Online its not released yet,but its released in Korea and me and about 50 other ppl (not-korean) are playing it. I dont know what informations do you need? Is iit helping if i run game and run netstat to see ip?

#6
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,118 posts
  • Location:Vancouver, Eh! Cleverness: 200
You can view if the IP is reachable (by you), and possibly determine it to be online if being reachable = online. Popularity will have to be either determined yourself through ranking (a local database to hold servers), scraping sites that list popularity (not really a good idea) or an API or interface the game website provides to show popularity. Some games do not expose any external functionality you'd have to imagine.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.

#7
anyad

anyad

    Newbie

  • Members
  • Pip
  • 9 posts
<?php


$ip = "your.server.ip.adress";

$ls_port = serverport;


	$fp1 = @fsockopen($ip, $ls_port, $errno, $errstr, 1);

	if (!$fp1) {

		echo "Offline<br/>\n";

	} else {

		echo "Online<br/>\n";

	}


?>

It should work for server status cheking, and if you want to show online players count you need take information from mysql or mssql, for example count all connected players rows and print that number. I can give you script like this, just say what sql server you are using.

#8
Meister511

Meister511

    Newbie

  • Members
  • PipPip
  • 10 posts
I know how to make sql db but what server am using? idk really maybe this can help:
Main Domain 	XXXXXXXX

Home Directory 	XXXXXXXX

Last login from 	XXXXXXXX

CPU Usage 	0 / 100 %

Memory Usage 	0 / 1048576 KB

Entry Processes 	0 / 20

Disk Space Usage 	273.39 / ∞ MB

Monthly Bandwidth Transfer 	5.64 / 250000 MB

Email Accounts 	3 / ∞

Subdomains 	1 / ∞

Parked Domains 	0 / ∞

Addon Domains 	1 / ∞

FTP Accounts 	0 / ∞

SQL Databases 	3 / ∞

Mailing Lists 	0 / ∞

MySQL Disk Space 	30.74 MB

Postgresql Disk Space 	0 MB

Mailing List Disk Space 	0 MB

Hosting package 	Unlimited

Server Name 	master

cPanel Version 	11.30.5 (build 3)

Theme 	x3

Apache version 	2.2.21

PHP version 	5.2.9

MySQL version 	5.1.56

Architecture 	x86_64

Operating system 	linux

Shared IP Address 	XXXXXXXXXXX

Path to sendmail 	/usr/sbin/sendmail

Path to Perl 	/usr/bin/perl

Perl version 	5.8.8

Kernel version 	2.6.18-374.3.1.el5.lve0.8.44

cPanel Pro 	1.0 (RC1)  





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users