Download the PHP package noq/roomq without Composer
On this page you can find all versions of the php package noq/roomq. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package roomq
Short Description NoQ RoomQ
License BSD-3-Clause
Homepage https://github.com/redso/noq-php-sdk
Informations about the package roomq
Install
Download the latest composer package from here.
RoomQ Backend SDK - PHP
The RoomQ Backend SDK is used for server-side integration to your server. It was developed with PHP.
High Level Logic
- End user requests a page on your server
- The SDK verify if the request contain a valid ticket and in Serving state. If not, the SDK send him to the queue.
- End user obtain a ticket and wait in the queue until the ticket turns into Serving state.
- End user is redirected back to your website, now with a valid ticket
- The SDK verify if the request contain a valid ticket and in Serving state. End user stay in the requested page.
- The end user browses to a new page, and the SDK continue to check if the ticket is valid.
How to integrate
Prerequisite
To integrate with the SDK, you need to have the following information provided by RoomQ
- ROOM_ID
- ROOM_SECRET
- ROOMQ_TICKET_ISSUER
- ROOMQ_STATUS_API
- API_KEY
- LOCKER_URL
Major steps
To validate that the end user is allowed to access your site (has been through the queue) these steps are needed:
- Initialise RoomQ
- Determine if the current request page/path required to be protected by RoomQ
- Initialise Http Context Provider
- Validate the request
- If the end user should goes to the queue, set cache control
- Redirect user to queue
Integration on specific path
It is recommended to integrate on the page/path which are selected to be provided. For the static files, e.g. images, css files, js files, ..., it is recommended to be skipped from the validation. You can determine the requests type before pass it to the validation.
Implementation Example
The following is an RoomQ integration example in php.
Ajax calls
RoomQ doesn't support validate ticket in Ajax calls yet.
Browser / CDN cache
If your responses are cached on browser or CDN, the new requests will not process by RoomQ. In general, for the page / path integrated with RoomQ, you are not likely to cache the responses on CDN or browser.
Hash of URL
As hash of URL will not send to server, hash information will be lost.
Version Guidance
Version | Packagist | PSR-7 | PHP Version |
---|---|---|---|
1.x | noq/roomq |
Yes | >= 5.5 |
2.x | noq/roomq |
Yes | >= 7.3 |
All versions of roomq with dependencies
firebase/php-jwt Version ^5.3
ramsey/uuid Version ^4.1
guzzlehttp/guzzle Version ^7.0