Exemplo n.º 1
0
$qr = new BarcodeQR();
switch ($type) {
    case 'url':
        $qr->url($url);
        break;
    case 'contact':
        $qr->contact($name, $address, $phone, $email);
        break;
    case 'email':
        $qr->email($email, $subject, $message);
        break;
    case 'geo':
        $qr->geo($lat, $lon, $height);
        break;
    case 'phone':
        $qr->phone($phone);
        break;
    case 'sms':
        $qr->sms($phone, $message);
        break;
    case 'text':
        $qr->text($text);
        break;
    case 'wifi':
        $qr->wifi($wifi_type, $ssid, $password);
        break;
    case 'bookmark':
        $qr->bookmark($text, $url);
        break;
}
$qr->draw($size);
Exemplo n.º 2
0
<!DOCTYPE html>
<html>
<head>
	<title>Web Code Bar</title>
	<?php 
include "BarcodeQR.php";
?>
</head>
<body>
<?php 
$qr = new BarcodeQR();
$qr->bookmark("title", "url");
// contact
$qr->contact("Ram Pukar", "Patan", "9849122794", "*****@*****.**");
$qr->draw(150, "tmp/qr-code.png");
?>
</body>
</html>