Skip to content

qr_encode ​

php
boolean|string qr_encode ( string  $text [, array  $params] )

Generates QR codes. At the call location, the function inserts an HTML <img src="image_url" /> tag that displays a QR code image in the email.

Parameters:

  • $text - text to encode
  • $params - display parameters:
    • First array element - QR code size (default: 100x100px)
    • Second array element - padding (default: 10px)
    • Third array element - foreground colour in RGBA format (default: array(0,0,0))
    • Fourth array element - background colour in RGBA format (default: array(255,255,255))

Example:

php
qr_encode("example.pl", array(200, 10, array(0,0,0), array(255,255,255)));