Search by

courseexe / realtime

projectslyai

Official PHP Server Publisher SDK for Courseexe Realtime Channels

v1.0.0 2026-11-22 09:02 UTC

This package is auto-updated.

Last update: 2026-11-22 09:14:21 UTC


README

Official PHP server publisher SDK for Courseexe Realtime Channels (https://courseexe.com).

Latest Version License

Installation via Composer

composer require courseexe/realtime

Usage

<?php
require_once __DIR__ . '/vendor/autoload.php';

use Courseexe\Realtime\RealtimeServer;

$realtime = new RealtimeServer([
    'app_id' => 'YOUR_APP_ID',
    'key'    => 'YOUR_APP_KEY',
    'secret' => 'YOUR_APP_SECRET',
    'host'   => 'courseexe.com',
    'port'   => 443,
    'secure' => true
]);

// 1. Broadcast an event to one or more channels
$result = $realtime->trigger('orders', 'order-created', [
    'order_id' => 1042,
    'amount'   => '$99.00',
    'status'   => 'paid'
]);

// 2. Authenticate a private or presence channel
$auth = $realtime->authenticateChannel($_POST['socket_id'], $_POST['channel_name']);
header('Content-Type: application/json');
echo json_encode($auth);

Source & Repository

License

MIT © Courseexe & PROJECTSLY AI SOLUTIONS