Line | |
---|
1 | <?php |
---|
2 | require_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.