source: trunk/xgraph/jpgraph/Examples/qrexample01.php @ 42

Last change on this file since 42 was 42, checked in by marrucho, 10 years ago
File size: 494 bytes
Line 
1<?php
2require_once ('jpgraph/QR/qrencoder.inc.php');
3
4// Data to be encoded
5$data = '01234567';
6
7// Create a new instance of the encoder and let the library
8// decide a suitable QR version and error level
9$encoder = new QREncoder();
10
11// Use the image backend
12$backend = QRCodeBackendFactory::Create($encoder, BACKEND_IMAGE);
13
14// Set the module size (quite big)
15$backend->SetModuleWidth(5);
16
17// .. send the barcode back to the browser for the data
18$backend->Stroke($data);
19?>
Note: See TracBrowser for help on using the repository browser.