ninjacto / ortc-php
PHP SDK wrapper for ORTC (Realtime pub/sub framework from RealTime.co)
Installs: 6
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 4
Forks: 0
Open Issues: 0
Language:HTML
Requires
- php: ~5.5|~7.0
- guzzlehttp/guzzle: ~6.2
Requires (Dev)
- mockery/mockery: ~0.9.
- phpunit/phpunit: ~4.0||~5.0
- squizlabs/php_codesniffer: ^2.3
This package is not auto-updated.
Last update: 2025-02-01 21:57:28 UTC
README
A modern PHP client for ORTC (Open Real-Time Connectivity, realtime & cloud-based pub/sub framework from realtime.co for PHP 5.5+).
Install
Via Composer
$ composer require ninjacto/ortc-php
Usage
$ortcConfig = new OrtcConfig(); $ortcConfig->setApplicationKey('YOUR_APPLICATION_KEY'); $ortcConfig->setPrivateKey('YOUR_PRIVATE_KEY'); $ortcConfig->setVerifySsl(false); $url = 'http://ortc-developers.realtime.co/server/2.1'; // ORTC server URL $authToken = 'YOUR_AUTHENTICATION_TOKEN'; $channels = []; $testChannel = new Channel(); $testChannel->setName('CHANNEL_NAME'); $testChannel->setPermission(Channel::PERMISSION_READ); $channels[] = $testChannel; $ortc = new Ortc($ortcConfig); $authRequest = new AuthRequest(); $authRequest->setAuthToken($authToken); $authRequest->setExpireTime(61); $authRequest->setPrivate(true); $authRequest->setChannels($channels); $authResponse = $ortc->authenticate($authRequest);
Change log
Please see CHANGELOG for more information what has changed recently.
Testing
$ composer test
Contributing
Please see CONTRIBUTING and CONDUCT for details.
Security
If you discover any security related issues, please email ramin.farmani@gmail.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.