Closed Parilar closed 10 years ago
There is no protocol named "ts3", use "teamspeak3".
The page is still empty :/
If i use the Source from github it's empty too
I think the problem is the read function. I've tried $dir = dir($protocols_path); echo $dir->read(); and there is no echo.
What version of PHP are you using?
5.4.4
Do you have any error log information from PHP? You may try adding error_reporting(E_ALL); to the top of your script. Also make sure display_errors is set on as well. Without more information or errors I will be unable to help.
At the least if you are unable to query the script should output an empty array when rendered.
I've added error_reporting(E_ALL); but the page is completly empty.
I can only imagine there is a configuration error with your webserver. Using the latest version with your code I get the expected outcome.
Pastebin your PHP error log and post it here.
The problem is , there is no error log. (That's the problem.) it's a fresh Debian 7 System as basic LAMP Server.
Have you tried running any other PHP code on your webserver?
Yes, and it works Fine.
I'm wondering about, that there is no error.
Changed error reporting to ; error_reporting(-1); ini_set('display_errors', 1);
Error : Fatal error: Class 'GameQ_Protocols' not found in /var/www/site/game/gameq/protocols/gamespy2.php on line 29
EDIT: i don't know why, but after redownloading the project everything is working fine
I've used this Code and only got an empty Page as result. (list.php is empty to)
<?php // Include the main class file require '../GameQ.php';
// Define your servers, // see list.php for all supported games and identifiers. $servers = array( array( 'id' => 'BF3', 'type' => 'ts3', 'host' => '37.120.169.4:9987', ) );
// Call the class, and add your servers. $gq = new GameQ(); $gq->addServers($servers);
// You can optionally specify some settings $gq->setOption('timeout', 4); // Seconds
// You can optionally specify some output filters, // these will be applied to the results obtained. $gq->setFilter('normalise');
// Send requests, and parse the data $results = $gq->requestData();
// Some functions to print the results function print_results($results) {
}
function print_table($data) {
}
?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
GameQ - Example script
Bold, red variables are always set by gameq. Additionally, the normal red variables are always set when the normalise filter is enabled.
gq_online will always contain a boolean indicating if the server responded to the request.
Click here for a list of supported games.