Giter Site home page Giter Site logo

opengsq / opengsq-php Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 13.53 MB

PHP library designed for querying game servers. It supports 4 different query protocols.

Home Page: https://php.opengsq.com/

License: MIT License

PHP 100.00%
opengsq game php server-query game-server-query

opengsq-php's People

Stargazers

Mateusz Dudek avatar TatLead avatar  avatar

Watchers

TatLead avatar

opengsq-php's Issues

getInfo() does not work

I've tried all the possible combinations that I can think of but I haven't gotten the getInfo() function working once. It always throws an exception because the IP and post does not exist.

This is one of the examples I'm using:

<?php

// Include the Composer autoloader
require_once 'vendor/autoload.php';

// Import the Vcmp class from the OpenGSQ\Protocols namespace
use OpenGSQ\Protocols\EOS;

$clientId = 'xyza78916PZ5DF0fAahu4tnrKKyFpqRE';
$clientSecret = 'j0NapLEPm3R3EOrlQiM8cRLKq3Rt02ZVVwT0SkZstSg';
$deploymentId = '0a18471f93d448e2a1f60e47e03d3413';
$grantType = 'external_auth';
$externalAuthType = 'deviceid_access_token';

try {
    $externalAuthToken = EOS::getExternalAuthToken($clientId, $clientSecret, $externalAuthType);
    $accessToken = EOS::getAccessToken($clientId, $clientSecret, $deploymentId, $grantType, $externalAuthType, $externalAuthToken);
    $matchmaking = EOS::getMatchmaking($deploymentId, $accessToken);
    $eos = new EOS('34.22.86.173', '8211', $deploymentId, $accessToken);
    echo '<pre>';
    print_r($matchmaking);
    print_r($eos->getInfo());
} catch (Exception $e) {
    echo '<pre>';
    print_r($e);
}

The IP and port from the example is just a random server from the $matchmaking array.

Any idea why it does not work? Am I doing something wrong?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.