CeKiT Posted January 10, 2013 Share Posted January 10, 2013 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
Anderl Posted January 10, 2013 Share Posted January 10, 2013 Probably the port is wrong. Link to comment
CeKiT Posted January 10, 2013 Author Share Posted January 10, 2013 but the port is the same server Link to comment
Scripting Moderators Sarrum Posted January 12, 2013 Scripting Moderators Share Posted January 12, 2013 UDP ports is open (on website)? Link to comment
CeKiT Posted January 13, 2013 Author Share Posted January 13, 2013 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. Link to comment
Scripting Moderators Sarrum Posted January 14, 2013 Scripting Moderators Share Posted January 14, 2013 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
CeKiT Posted January 16, 2013 Author Share Posted January 16, 2013 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
Jaysds1 Posted February 16, 2013 Share Posted February 16, 2013 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. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now