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
7 replies to this topic
#1
Posted 31 December 2011 - 07:42 AM
|
|
|
#2
Posted 31 December 2011 - 03:24 PM
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.
#3
Posted 31 December 2011 - 03:29 PM
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
Posted 31 December 2011 - 03:34 PM
It is COMPLETELY different from one game to the next. Since you haven't specified the game, no one can give you helpful advice.
#5
Posted 31 December 2011 - 03:37 PM
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
Posted 31 December 2011 - 11:03 PM
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.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
#7
Posted 01 January 2012 - 02:54 AM
<?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
Posted 01 January 2012 - 03:30 AM
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


Sign In
Create Account


Back to top









