Jump to content

GameQ monitor


CeKiT

Recommended Posts

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

Link to comment
  • Scripting Moderators

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;     
} 
?> 

Link to comment

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

Link to comment
  • 4 weeks later...

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...