Jump to content

GameQ monitor


CeKiT

Recommended Posts

Posted

Hello.

Someone once gameq install?

Because I'm trying to install

You Zver-CR showed me this:

1) Download latest version (gameq.1.12.zip)

2) Create folder 'GameQ' on your website and unzip/put all files in that folder.

(screen)

3) Create index.php in 'www' folder.

PHP Code:

<?php 
require_once ('GameQ/GameQ.php'); //class 
  
$server['mtasa'] = array ('mtasa', '173.208.251.205', 25898+123); //ip & port 
$query = new GameQ; 
$query -> addServers ($server); 
$data = $query->requestData(); 
  
foreach ($server AS $server_id => $values) { 
    $info = $data[$server_id]; 
    if (!$info["servername"]) { 
        echo 'Server offline'; 
    } else { 
        echo "Server name: "; 
        echo $info["servername"]; 
        echo '<br/>'; 
        echo "Gamemode: "; 
        echo $info["gametype"]; 
        echo '<br/>'; 
        echo "Map: "; 
        echo $info["map"]; 
        echo '<br/>'; 
        echo "Players: "; 
        echo $info["num_players"] ."/". $info["max_players"]; 
        echo '<br/>'; 
        echo "Password: "; 
        echo $info['password'] == '0' ? 'No' : 'Yes'; 
        echo '<br/><br/>'; 
    } 
    } 
?> 

Result:

Server name: [RIX|XPG]Xtreme Pro Gamers DD/DM Espanol | [url=http://www.clanxpg.com]http://www.clanxpg.com[/url] | International 
Gamemode: [DM] FLO V6 - Realistic Millennium 
Map: [DM] FLO V6 - Realistic Millennium 
Players: 2/32 
Password: No 

Looks like the perfect work for you. But to me says server offline.

Someone who knows about it?

Thanks

Posted

Probably the port is wrong.

"[...] If you don’t love it, if you’re not having fun doing it, you don’t really love it, you’re going to give up." - Steve Jobs, 2007

Posted

They have to be open. The web hosting for free. Is 000webhost.

But in my localhost does not work. What ports should I open?

EDIT: I tried it on different web hosting. But still not working. I also tried with different servers.

  • Moderators
Posted

Try this script for testing UDP ports:

<?php 
$ip = '173.208.251.205'; 
$port = '25898'; 
  
$socket = fsockopen ( 'udp://' . $ip, $port+123, $errno, $errstr ); 
socket_set_timeout ( $socket, 1, 0 ); 
  
if ( $socket ) { 
    fwrite ( $socket, 's' ); 
    $data = fread ( $socket, 16384 ); 
    fclose ( $socket ); 
    echo $data;     
} 
?> 

Posted

works

EYE1mta25898K[RIX|XPG]Xtreme Pro Gamers DD/DM Espanol | http://www.clanxpg.com | International[DM] DC v.6 - Vitality[DM] DC v.6 - Vitality1.301632?RenZo92?Souls205?Evo//MeLo<3184?-SoD-^Speedy^265? --Empty--186? SoNyeoSD153?*[XPG]*-Rogeer^122?-|ApG|-^R3n_:~|245? SoD~Step215?'~Aileena|<3!174?XuG~ken-Block725?WOLF1100?[vS]*[F]ranco//153? [XPG]Shicko#184?T7-|nob.com204?GW|GonzaloWesker195

  • 4 weeks later...
Posted

try this:

Installation

============

Just extract the library to where you want to use it.

Some servers using the source protocol (counterstrike, left4dead, team fortress 2 etc)

may have compression enabled. For this bzip2 must be installed

(see http://php.net/bzip2.setup for details). The script will work if this is not

enabled, but not all data from those servers will be available.

My in-game name: Jaysds1

Retired CMG Scripter

World Of Tanks GameMode (Open-Source): https://github.com/Jaysds1/mtasa-wot-gamemode

Online GUI-Editor (WIP): https://forum.mtasa.com/topic/47678-online-gui-editor/

 

sE5Qm.png

TiV3C.png

img.php?id=0&text=Lua%20Scripter

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...