Download the PHP package apirone/php-qr-code without Composer
On this page you can find all versions of the php package apirone/php-qr-code. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download apirone/php-qr-code
More information about apirone/php-qr-code
Files in apirone/php-qr-code
Download apirone/php-qr-code
More information about apirone/php-qr-code
Files in apirone/php-qr-code
Vendor apirone
Package php-qr-code
Short Description Generate QR-codes from a single PHP file.
License MIT
Homepage https://github.com/apirone/php-qr-code/
Package php-qr-code
Short Description Generate QR-codes from a single PHP file.
License MIT
Homepage https://github.com/apirone/php-qr-code/
Please rate this library. Is it a good library?
Informations about the package php-qr-code
php QR Code generator library
- Generate QRcode from a single PHP file. MIT license.
- Output to raw PNG or base64 encoded data
Install
Usage
Options
Use options array to initialize class:
Available options keys
You can define option as [key => value, ...]
or use the option name as a property $qr->s = 'qrl'
-
s
- QR error correction level. Available values:qrl
- Level L (Low) 7% of data bytes can be restored.qrm
- Level M (Medium) 15% of data bytes can be restored.qrq
- Level Q (Quartile) 25% of data bytes can be restored.qrh
- Level H (High) 30% of data bytes can be restored.
w
- Width of image. Overridessf
orsx
.h
- Height of image. Overridessf
orsy
.sf
- Scale factor. Default 4.sx
- Horizontal scale factor. Overridessf
.sy
- Vertical scale factor. Overridessf
.p
- Padding. Default is 0.pv
- Top and bottom padding. Default is value of `p``.ph
- Left and right padding. Default is value ofp
.pt
- Top padding. Default is value ofpv
.pl
- Left padding. Default is value ofph
.pr
- Right padding. Default is value ofph
.pb
- Bottom padding. Default is value ofpv
.fc
- Foreground color in#RRGGBB
format.bc
- Background color in#RRGGBB
format.md
- Module density. A number between 0 and 1. Default is 1.wq
- Width of quiet area units. Default is 1. Use 0 to suppress quiet area.wm
- Width of narrow modules and spaces. Default is 1.
Methods
Init methods. Static.
png($data, $options = [])
- Convenience method to quickly generate an base64 encoded PNG. Static.init($data = '', $options = [])
- Init QR code instance. Static.
Set error correction levels
levelLow()
- Sets
option toqrl
.levelMid()
- Sets
option toqrm
.levelQrt()
- Sets
option toqrq
.levelHigh()
- Sets
option toqrh
.levelAuto()
- Unsets
option.
Some parameters setup methods
Call methods without params to clear options value.
data($data = '')
- Set QR code dataoptions($options = [])
- Set QR code optionssize($size = null)
- Generated image size. Sets bothh
andw
options to the same value.scale($scale = null)
- Setsf
option value.padding($padding = null)
- Setp
option.color($color = null)
- Setfc
option.background($color = null)
- Setbc
option.quietZone($size = null)
- Setwq
option.density($density = null)
- Setmd
option.
Generate QR methods
render_image()
- Return generated GD resource.raw()
- Return raw PNG image data.base64()
- Return bse64 encoded PNG image data.
All versions of php-qr-code with dependencies
PHP Build Version
Package Version
Requires
ext-gd Version
*
The package apirone/php-qr-code contains the following files
Loading the files please wait ....