restaurantcontroller / phpqr
Generate a QR code easily in PHP
Requires
- php: ^7.2
This package is not auto-updated.
Last update: 2021-07-02 23:21:33 UTC
README
PHPQR is archived and no longer maintained.
Use the Chart API directly. See https://developers.google.com/chart/infographics/docs/qr_codes.
Or, even better, use a QR code library for PHP.
If you are still using PHPQR, I recommend you to fork this repo.
PHPQR
Encode a text easily made with Google's API
This plugin for PHP that is easy to use makes creating QR codes easier. It sends a HTTP request to 'googleapis.com' to get a QR code.
Getting Started
Download the lastest version and unpack it.
Write this code to include the library:
require 'path/to/phpqr/class.php';
And then you can use the library in the PHP code.
Install with Composer
composer require restaurantcontroller/phpqr dev-master
Then, call the class
require 'path/to/vendor/restaurantcontroller/phpqr/class.php';
Docs are coming soon
Generating a QR Code To generate a QR code, create an PHPQR instance.
And then, call generateQRWithArray($size, $raw)
function to get the QR data as an array.The raw variable is your text.
What does it return in an array?
It returns "imgUrl" as the QR code URL and "htmlCode" as the html code for getting the code in your HTML page.
Size example: 200x200
Size data: widthxheight
Report An Issue
Please if you have a problem post it in Issues in GitHub. We will help you.