| Server IP : 93.86.61.54 / Your IP : 216.73.216.206 Web Server : Apache/2.4.62 (Ubuntu) System : Linux rasin.ddns.net 6.8.0-124-generic #124~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 21:05:19 UTC x86_64 User : www-data ( 33) PHP Version : 8.4.22 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/share/php/jpgraph/src/Examples/ |
Upload File : |
<?php
require_once ('jpgraph/QR/qrencoder.inc.php');
// Data to be encoded
$data = 'ABCDEFGH01234567';
// QR Code specification
$version = -1; // -1 = Let the library decide version (same as default)
$corrlevel = QRCapacity::ErrM; // Medium erro correction
$modulewidth = 2; // Module width
$back = BACKEND_IMAGE; // Default backend
$quiet = 4; // Same as default value
// Create encoder and backend
$encoder = new QREncoder($version, $corrlevel);
$backend = QRCodeBackendFactory::Create($encoder, $back);
// Set the module size
$backend->SetModuleWidth($modulewidth);
// Set Quiet zone (this should rarely need changing from the default)
$backend->SetQuietZone($quiet);
if( $back == BACKEND_IMAGE ) {
$backend->Stroke($data);
}
else {
$str = $backend->Stroke($data);
echo '<pre>'.$str.'</pre>';
}
?>