Server Check

KaitoX

New Member
Alright I have done a reinstall from fresh. Working fine now it seems. I do have a minor issue with not being able to uninstall the previous version but for now it is disabled.
 

Basti

Administrator
Staff member
Yea delete button does not work as not database entries were made before, so it errors out as well. You could just delete the folder from ftp and it should be good.
 

Morus

www.votezone.eu , www.privateserversranking.com
Hi,

How can I just implement this

Code:
{$server_check_players} - Number of players currently playing. In form of 12/24
to my website? What files I need to use just to create plugin to show numbers of online players.
 

Basti

Administrator
Staff member
You need to install the full plugin. The way this library work it cannot query just this or that.
It is listening to the server and grabs everything available and stores these values into an array. This eases the hole process as all games use different values for the items they allow querying for.
We just store 5 of these array items as of now though into the database, because this are the only tags shared by most of the games. I dont want to rewrite this, as its 1. a lot of work, and 2. i want to keep the possiblity open for people to add a specific tag for a specific game.

Just write {$server_check_players} into your file, nothing wrong with it. Dont worry, you dont query the server with each pageload. It does this every 5 minutes ( or what you´ve choosen) by cron
 

Morus

www.votezone.eu , www.privateserversranking.com
Problem is that I have part of the code already as a plugin done by you that is including IP and port. So when I'm adding the new plugin I have 2 x fields with IP and port and because of that plugin is not recognising if the server is online or offline. It is showing offline status all the time (what means it is not showing players as well).
 

Basti

Administrator
Staff member
Ip, port wont be added a second time. The installer file takes note if you have it already.
If the site is showing as offline it properbly need the query_port filled in by you/or the user.

If a user dont submit a query port, a default one for that game is used. But if he set up his server to use a different query port, it cant query the server.

This online offline is supurior to the last plugin, as it will not timeout your entire website if a server is slow to respond.

Suppose you have a backup of your database and old plugin files, then...
make sure you have correctly added the supported games to categories.
If you have a battlefield category and add the game battlefield 3 to it, the server check only works for that game, no battfield 2 or 1942. They all use different query mechanism

If you still have problems, drop me a pm with the member stats page in question and ill help you find out if you made anything wrong or we just need to find out the query port
 

Morus

www.votezone.eu , www.privateserversranking.com
sorry to bother you guys again but I have that error during the installation of this plugin. I stuck on step 3 of the tutorial

Code:
Fatal error: Call to a member function read() on a non-object in /homepages/46/d339036285/htdocs/votezone/sources/admin/settings.php(217) : eval()'d code on line 245
 

Basti

Administrator
Staff member
Step 2 is completed? Looks like it cannot read the protocols paths due a missing directory or generally a wrong path setting in admin_settings_build_page.php ( path inclusion is sometimes a pain )

Please msg me ftp info and i would like to try out another include path on your hosting.
Disable plugin until then
 

Basti

Administrator
Staff member
Yes it is, though i tested it and it works, there may be exceptions. Not much feedback yet on the plugin
 

malichulo

New Member
Yes it is, though i tested it and it works, there may be exceptions. Not much feedback yet on the plugin
Seems that I can't fill "Game Server IP" form with a text as an IP, I get "Enter a valid server IP" and seems that Minecraft 25565 query is always giving an offline response, tried with different servers with default port 25565.
 

Basti

Administrator
Staff member
Yes, as of now only ips are supported, but i soon will update this to allow urls as well.

Also let me know serverip and queryport with which you are trying. Also note that not every server uses the default query port, some have set it up to be a different one, so if that is the case and you try to submit the default port, it obviously will not work.
 

malichulo

New Member
Yes, as of now only ips are supported, but i soon will update this to allow urls as well.

Also let me know serverip and queryport with which you are trying. Also note that not every server uses the default query port, some have set it up to be a different one, so if that is the case and you try to submit the default port, it obviously will not work.
I have been trying to query servers which their default port is 25565 and is working randomly (It works for a server, it doesn't work for another) when other topsites can ping the same servers I am trying to ping without any problem.
 

Basti

Administrator
Staff member
Nothing i can do to help you if you dont answer my question. Without something to test iam not able to help.
 

Morus

www.votezone.eu , www.privateserversranking.com
I was thinking of lineage 2 option of showing amount of Online Players. That might be really difficult to do cause to get the info, you need to connect to database of the server, and I really doubt that any member will provide you with username and password to their database. Basicly you need to connect to character table in database of gameserver. You have lots of columns there (see sql file below with the columns):
Code:
CREATE TABLE IF NOT EXISTS `characters` (
  `account_name` VARCHAR(45) DEFAULT NULL,
  `charId` INT UNSIGNED NOT NULL DEFAULT 0,
  `char_name` VARCHAR(35) NOT NULL,
  `level` TINYINT UNSIGNED DEFAULT NULL,
  `maxHp` MEDIUMINT UNSIGNED DEFAULT NULL,
  `curHp` MEDIUMINT UNSIGNED DEFAULT NULL,
  `maxCp` MEDIUMINT UNSIGNED DEFAULT NULL,
  `curCp` MEDIUMINT UNSIGNED DEFAULT NULL,
  `maxMp` MEDIUMINT UNSIGNED DEFAULT NULL,
  `curMp` MEDIUMINT UNSIGNED DEFAULT NULL,
  `face` TINYINT UNSIGNED DEFAULT NULL,
  `hairStyle` TINYINT UNSIGNED DEFAULT NULL,
  `hairColor` TINYINT UNSIGNED DEFAULT NULL,
  `sex` TINYINT UNSIGNED DEFAULT NULL,
  `heading` MEDIUMINT DEFAULT NULL,
  `x` MEDIUMINT DEFAULT NULL,
  `y` MEDIUMINT DEFAULT NULL,
  `z` MEDIUMINT DEFAULT NULL,
  `exp` BIGINT UNSIGNED DEFAULT 0,
  `expBeforeDeath` BIGINT UNSIGNED DEFAULT 0,
  `sp` INT UNSIGNED NOT NULL DEFAULT 0,
  `karma` INT UNSIGNED DEFAULT NULL,
  `fame` MEDIUMINT UNSIGNED NOT NULL default 0,
  `pvpkills` SMALLINT UNSIGNED DEFAULT NULL,
  `pkkills` SMALLINT UNSIGNED DEFAULT NULL,
  `clanid` INT UNSIGNED DEFAULT NULL,
  `race` TINYINT UNSIGNED DEFAULT NULL,
  `classid` TINYINT UNSIGNED DEFAULT NULL,
  `base_class` TINYINT UNSIGNED NOT NULL DEFAULT 0,
  `transform_id` SMALLINT UNSIGNED NOT NULL DEFAULT 0,
  `deletetime` bigint(13) unsigned NOT NULL DEFAULT '0',
  `cancraft` TINYINT UNSIGNED DEFAULT NULL,
  `title` VARCHAR(16) DEFAULT NULL,
  `title_color` MEDIUMINT UNSIGNED NOT NULL DEFAULT '16777079',
  `accesslevel` MEDIUMINT DEFAULT 0,
  `online` TINYINT UNSIGNED DEFAULT NULL,
  `onlinetime` INT DEFAULT NULL,
  `char_slot` TINYINT UNSIGNED DEFAULT NULL,
  `newbie` MEDIUMINT UNSIGNED DEFAULT 1,
  `lastAccess` bigint(13) unsigned NOT NULL DEFAULT '0',
  `clan_privs` MEDIUMINT UNSIGNED DEFAULT 0,
  `wantspeace` TINYINT UNSIGNED DEFAULT 0,
  `isin7sdungeon` TINYINT UNSIGNED NOT NULL default 0,
  `punish_level` TINYINT UNSIGNED NOT NULL DEFAULT 0,
  `punish_timer` INT UNSIGNED NOT NULL DEFAULT 0,
  `power_grade` TINYINT UNSIGNED DEFAULT NULL,
  `nobless` TINYINT UNSIGNED NOT NULL DEFAULT 0,
  `subpledge` SMALLINT NOT NULL DEFAULT 0,
  `lvl_joined_academy` TINYINT UNSIGNED NOT NULL DEFAULT 0,
  `apprentice` INT UNSIGNED NOT NULL DEFAULT 0,
  `sponsor` INT UNSIGNED NOT NULL DEFAULT 0,
  `varka_ketra_ally` TINYINT NOT NULL DEFAULT 0,
  `clan_join_expiry_time` bigint(13) unsigned NOT NULL DEFAULT '0',
  `clan_create_expiry_time` bigint(13) unsigned NOT NULL DEFAULT '0',
  `death_penalty_level` SMALLINT UNSIGNED NOT NULL DEFAULT 0,
  `bookmarkslot` SMALLINT UNSIGNED NOT NULL DEFAULT 0,
  `vitality_points` SMALLINT UNSIGNED NOT NULL DEFAULT 0,
  `createTime` bigint(13) unsigned NOT NULL DEFAULT '0',
  `language` VARCHAR(2) DEFAULT NULL,
  PRIMARY KEY (`charId`),
  KEY `clanid` (`clanid`)
);
Column "online" is the one we need to reffer to. if its "0" (zero) it means the player is offline, if "1" it means the player is online.
I can't imagine other method to get the online status and calculate the amount of online players with accessing database. So unfortunately it will be very hard if not impossible to do it. :(
 

LemoniscooL

Member
I was thinking of lineage 2 option of showing amount of Online Players. That might be really difficult to do cause to get the info, you need to connect to database of the server, and I really doubt that any member will provide you with username and password to their database. Basicly you need to connect to character table in database of gameserver. You have lots of columns there (see sql file below with the columns):

Column "online" is the one we need to reffer to. if its "0" (zero) it means the player is offline, if "1" it means the player is online.
I can't imagine other method to get the online status and calculate the amount of online players with accessing database. So unfortunately it will be very hard if not impossible to do it. :(
Well there is a way to do so, without the webmaster giving SQL information to you =)
I could write a plugin for that, if youre interested write me
 

Morus

www.votezone.eu , www.privateserversranking.com
I've got a problem with setting the online/offline option for minecraft and also to show online players.
www.votezone.eu last member on the page. Showing red button as it would be offline and no online players. I installed the new plugin, done step 2, also cron job to run every 1 minut. I changed 1 think only, so in registration process, host are accepted as well as IP. I made a test on both host name and IP address but still not showing online/offline status and online players.
 

Basti

Administrator
Staff member
Is it possible to get such a plugin report database error, account suspended, or this forum is offline as sites offline?
Nope thats nothing you can get of the servers response.

@Morus. Ive got another report for minecraft servers, it seems there is some exception on servers. Oddly enough on some server it seems as they dont accept the minecraft query code but the minequery code.
Can you try to verify if this happening for you as well?
In admin remove your category from the minecraft game, and add your category to the minequery and see if it shows as online then.
 
Top