1. Go to this page and download the library: Download gockets-project/gockets-php library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
gockets-project / gockets-php example snippets
use Gockets\Client;
use Gockets\Model\Params;
$host = 'localhost'; // Default value
$port = '8844'; // Default value
$client = new Client(new Params($host, $port));
use Gockets\Model\ChannelOptions;
$options = new ChannelOptions('http://localhost/hook.php', 'tag');
// Using $client from previous sample
$channel = $client->prepare($options);
use Gockets\Exception\ChannelNotFoundException;
try {
$client->show('some-publisher-token');
} catch (ChannelNotFoundException $exception) {
// Your logic when publisher token was not found
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.