QRShow displays QR codes for the data that present in your redis cache.
This software is distributed under BSD 2-Clause License.
PHP 7.2+ with mbstring
extension.
For Apache
- Copy QRShow to your web server root directory, for example to /var/www/qrshow/. You can use git:
git clone https://github.com/optinsoft/QRShow.git
/var/www/qrshow/
├── conf/
| ├── config.php
│ └── ...
├── pub/
│ ├── css/
│ │ └── ...
│ ├── img/
│ │ └── ...
│ ├── js/
│ │ └── ...
│ ├── list/
│ │ └── index.php
│ └── index.php
├── src/
│ ├── components/
│ │ └── ...
│ └── pages/
│ └── ...
├── composer.json
├── LICENSE
└── README.md
- Go to /var/www/qrshow/ and update packages with composer
cd /var/www/qrshow/
composer update
- In your public html folder create symlink to /var/www/qrshow/pub
ln -s /var/www/qrshow/pub /var/www/html/qrshow
If SELinux prevents using network services from Apache and QRShow unable connect to redis, do this:
setsebool -P httpd_can_network_connect on
QRShow configuration file located at /conf/config.php
. Please, don't edit this file directly. Instead put your configuration settings to /conf/user_config.php
. You can create /conf/user_config.php
by copying it from /conf/_user_config.php
.
name | description |
---|---|
QR_AUTO_REFRESH |
Auto-refresh (reload) QR code interval, seconds |
QR_TITLE |
QR Show title |
QR_API_KEY |
If it is not empty then putting data to the cache will require provid valid signature. |
QR_TOKEN |
If it is not empty then putting data to the cache will require provide valid token. |
QR_REDIS_HOST |
Redis host. |
QR_REDIS_PORT |
Redis port. |
QR_REDIS_PREFIX |
Keys in redis will be combination of the QR_REDIS_PREFIX and id, provided by user. |
QR_MIN_TTL |
Min. ttl value. Seconds. |
QR_MAX_TTL |
Max. ttl value. Seconds. |
http://localhost/qrshow/
You will be asked for enter space
.
http://localhost/qrshow/?space=0123456789abcdef
http://localhost/qrshow/?id=100&space=0123456789abcdef
curl -d "id=100&space=0123456789abcdef&data=test&ttl=30&t=8f83ffeab1a30e2171520589a1d6a01f" -X POST http://localhost/qrshow/
name | description |
---|---|
id |
Data identifier. |
space |
Space - redis keys prefix. 16-40 hex digits. |
data |
Data content. |
title |
Data title. |
ttl |
Time-to-live, seconds. Must be between QR_MIN_TTL and QR_MAX_TTL . |
s |
Signature, base64-encoded HMAC SHA-512 hash of id + space + data + ttl + QR_API_KEY . |
t |
Token. |