Sign in

PHP

SCILL provides a PHP class that maps REST-APIs and provides convenience functions.

Source Code

You can find the source code to our PHP SDK in our public Github repository: https://github.com/scillgame/scill-php. If you encounter any bugs or issues, please let us know in the Issues tab of Github.

Install PHP library

Easiest way to install PHP library is by using composer:

composer require scillgame/scill-php

Usage

This example shows how to set up an instance of the SCILLClient class by providing an API key and then sending an event using the convenience function sendEvent.

<?php

require_once('./vendor/autoload.php');

$scillClient = new \SCILL\SCILLClient('XnY,-AV+7dNGwrp!fVmP;96xAZ~,sqXJ]]8Htd4U[F');
$eventsApi = $scillClient->getEventsClient();

try {
    $result = $scillClient->sendEvent('instant-death', '12345', '1234', array(
        "amount" => 1
    ));
} catch(\SCILL\ApiException $exception) {
    echo("Error: ".$exception->getMessage());
}

//$result = $scillClient->getEventsClient()->sendEvent($payload)->getStatus();
echo($result->getStatus());

Examples

Example code is provided in our public Github-Repository: