You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, i have a little trouble:
i using codeigniter with your library, and i have problem
i've get from database 500 and put it to gameq, And gameq always returns 86 online servers, but i sure that all others are offline.
My newbie-code:
public function index()
{
//$results['data'] = $this->_get_servers_list();
//Trying to get cached servers list
if(!$this->cache->file->get('serverslist'))
{
//If no... cache it
$results['data'] = $this->_cache_servers_list();
}
else
{
//Else - get cached servers list from cached file
$results['data'] = unserialize($this->cache->file->get('serverslist'));
}
//print_r($results['data']);
$this->load->view('serverslist', $results);
}
public function _get_servers_list()
{
//Gettings servers from database
$query = $this->database->_get_server_list('servers', 500);
$data = $query->result();
//Preparing servers list for GameQ
foreach($data as $result)
{
$servers[] = array(
'id' => $result->id,
'host' => $result->address,
'type' => 'cs16'
);
}
//Getting servers data with GameQ
$results = GameQ::factory()
->setOption('debug', true)
//->setOption('raw', true)
->setFilter('normalise')
->addServers($servers)
->requestData();
//Parsing offline servers
foreach($results as $id => $value)
{
if(!$results[$id]['gq_online'])
{
//unset($results[$id]);
//$results[$id]['gq_hostname'] = 'Server offline or changing map';
}
}
return $results;
}
public function _cache_servers_list()
{
//Getting servers list
$data = serialize($this->_get_servers_list());
//Caching servers list
$this->cache->file->save('serverslist', $data, 120);
return unserialize($data);
}
When i turn ->setOption('debug', true):
Fatal error: Uncaught exception 'GameQ_ProtocolsException' with message 'Data for GameQ_Protocols_Source::process_players does not have the proper header (should be 0xFF0xFF0xFF0xFF0x44). Header: ffffffff41' in Z:\home\mon\www\application\libraries\GameQ\gameq\protocols\source.php:266 Stack trace: #0 [internal function]: GameQ_Protocols_Source->process_players() #1 Z:\home\mon\www\application\libraries\GameQ\gameq\protocols\core.php(547): call_user_func_array(Array, Array) #2 Z:\home\mon\www\application\libraries\GameQ\GameQ.php(485): GameQ_Protocols_Core->processResponse() #3 Z:\home\mon\www\application\libraries\GameQ\GameQ.php(467): GameQ->filterResponse(Object(GameQ_Protocols_Cs16)) #4 Z:\home\mon\www\application\controllers\servers.php(62): GameQ->requestData() #5 Z:\home\mon\www\application\controllers\servers.php(80): Servers->_get_servers_list() #6 Z:\home\mon\www\application\controllers\servers.php(21): Servers->_cache_servers_list() #7 [internal function]: Servers->index() #8 Z:\home\mon\www\system\core\CodeIgni in Z:\home\mon\www\application\libraries\GameQ\gameq\protocols\core.php on line 555
Thanx:)
The text was updated successfully, but these errors were encountered:
There is a known limitation in the library that limits the number of servers it can query before it begins to behave oddly. An old issue on this is #98 and there is some information in there. I dont have the time to break down the code to find the issue. Maybe soon.
Hello, i have a little trouble:
i using codeigniter with your library, and i have problem
i've get from database 500 and put it to gameq, And gameq always returns 86 online servers, but i sure that all others are offline.
My newbie-code:
public function index()
{
//$results['data'] = $this->_get_servers_list();
//Trying to get cached servers list
if(!$this->cache->file->get('serverslist'))
{
//If no... cache it
$results['data'] = $this->_cache_servers_list();
}
else
{
//Else - get cached servers list from cached file
$results['data'] = unserialize($this->cache->file->get('serverslist'));
}
When i turn ->setOption('debug', true):
Fatal error: Uncaught exception 'GameQ_ProtocolsException' with message 'Data for GameQ_Protocols_Source::process_players does not have the proper header (should be 0xFF0xFF0xFF0xFF0x44). Header: ffffffff41' in Z:\home\mon\www\application\libraries\GameQ\gameq\protocols\source.php:266 Stack trace: #0 [internal function]: GameQ_Protocols_Source->process_players() #1 Z:\home\mon\www\application\libraries\GameQ\gameq\protocols\core.php(547): call_user_func_array(Array, Array) #2 Z:\home\mon\www\application\libraries\GameQ\GameQ.php(485): GameQ_Protocols_Core->processResponse() #3 Z:\home\mon\www\application\libraries\GameQ\GameQ.php(467): GameQ->filterResponse(Object(GameQ_Protocols_Cs16)) #4 Z:\home\mon\www\application\controllers\servers.php(62): GameQ->requestData() #5 Z:\home\mon\www\application\controllers\servers.php(80): Servers->_get_servers_list() #6 Z:\home\mon\www\application\controllers\servers.php(21): Servers->_cache_servers_list() #7 [internal function]: Servers->index() #8 Z:\home\mon\www\system\core\CodeIgni in Z:\home\mon\www\application\libraries\GameQ\gameq\protocols\core.php on line 555
Thanx:)
The text was updated successfully, but these errors were encountered: