PHP QRcode Generator

PHP QRcode Generator

Released 7 years ago , Last update 4 years ago

QR Code image generator using Google Charts API. Generate QR images with custom properties and save, embed and download it on the fly.

A QR code image generator class. Generate QR codes and use them in a variety of ways:

  • Save for later use
  • Embed directly in an HTML page (as an image or a base64 string)
  • Download generated image to your local computer.
  • Apply a watermark to your qrcode image
  • Generate your personal qr code image with a vCard Generator
  • 5 1
  • 4 0
  • 3 0
  • 2 0
  • 1 0
1 Reviews Read Reviews


14 day 14-day money-back guarantee


Personal License

  • Perpetual license

  • 1 site, unlimited servers

  • No distribution (hosted use only)

  • Commercial use


gQRcode is a QR code rendering class that uses the Google Charts API.

How to use this class

Include the class in your script and use setter methods to define QR code attributes. The class uses dynamic setters via the magic __call() function so you can set any custom attributes you want.

Example - generating a QR code image with contact information:

// Include the library
// Instance of the QR code class
$gQRcode = new gQRcode();
// Add the contact information using setters
$gQRcode->name("Name Example")
        ->address("bla blabla")
        ->AllThatYouWant("Hello World");
// and embed the QR code in the page as a simple HTML img
echo $gQRcode->embed();

Class methods

Function: The first two function are very simple: embed() that you can see above, and embed64() that work as embed(), but return a base64 encoded string that you can embed in HTML instead of a regular image. For more info see:

This function return the URL to the QR code image.

public function getLink( $size = 150 )

  1. @param int $size optional, size of you image

This function saves the QR code image generated.

public function saveImage( $name, $size = 150 )

  1. @param string $name name of your image
  2. @param int $size optional, size of you image

Download the generated image (opens download dialog)

public function downloadImage( $name )

  1. @param string $name name of your image

Apply a watermark to an image

public function applyWatermark( $name_image, $name_watermark, $name_newImg, $with = 30, $height = 30)

  1. @param Name of your qrcode image from floder cache/
  2. @param Name of your watermark from floder logo/
  3. @param Name of your image with watermark, saved in cache/
  4. @param With of your logo for watermark
  5. @param Height of your logo for watermark



$gQRcode = new gQRcode();

$gQRcode->text("Hello world!")

$gQRcode->saveImage("qrcodeimg.png", 250);

$gQRcode->applyWatermark( "qrcodeimg.png", "html5.png", "imgwithwatermark.png", 40, 40 )

Embed a image from your cache floder

public function embedfCache( $name )

  1. @param name of image cached
2 licenses, starting from From » $4.99 View Licenses

Get A Quote

What do you need?
  • Custom development
  • Integration
  • Customization / Reskinning
  • Consultation
When do you need it?
  • Soon
  • Next week
  • Next month
  • Anytime

Thanks for getting in touch!

Your quote details have been received and we'll get back to you soon.

Or enter your name and Email
  • HK Hattem Khaliel License holderPersonal License
    Purchased on Dec 1, 2013
    4 years ago
    vCard is not working good , can you try and fix it ? because when i generate vCard and scanned by Iphone ! the informations become as text not as vCard
  • PM perera malinda 5 years ago
    Can you create thus modification under wordpress as a extension....
  • W whitetornado 5 years ago
    Can you create thus modification under magento as a extension, what will that cos, please contact me on henk at handsapp dot nl