$qr->bookmark($_POST['mms_phone'], $_POST["mms_text"]);
            break;
        case "tel":
            $qr->phone_number($_POST['tel']);
            break;
        case "contactinfo":
            $qr->contact_info($_POST["contact_name"], $_POST["contact_address"], $_POST["contact_phone"], $_POST["contact_email"]);
            break;
        case "email":
            $qr->email($_POST["email_address"], $_POST["email_subject"], $_POST["email_txt"]);
            break;
        case "geo":
            $qr->geo($_POST["geo_lat"], $_POST["geo_lon"], $_POST["geo_above"]);
            break;
        case "wifi":
            $qr->wifi($_POST["wifi_aut"], $_POST["wifi_ssid"], $_POST["wifi_pass"]);
            break;
    }
    //here we specify inputted size and get link to image
    echo "<p><img src='" . $qr->get_link($_POST['size']) . "' border='0'/></p>";
    //to download image
    //$link = $qr->get_link();
    //$qr->download_image($link);
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>QR-codes</title>
<script type="text/javascript">
//this is a javascript function that changes div elements, based on which type is selected
Exemplo n.º 2
0
//Third param - email text
$qr->email("*****@*****.**", "Testing email subject", "Testing email text");
echo "<p>Email with subject and message text</p>";
echo "<p><img src='" . $qr->get_link(250) . "' border='0'/></p>";
//geo location works on smartphones
//First param - latitude
//Second param - longitude
//Third param - height above earth in meters
$qr->geo("40.71872", "-73.98905", "100");
echo "<p>Geographical location</p>";
echo "<p><img src='" . $qr->get_link() . "' border='0'/></p>";
//wifi network configuration works on Android devices
//First param - Authentication type WPA or WEP
//Second param - Network SSID
//Third param - password
$qr->wifi("WEP", "wifi_name", "password");
echo "<p>Wifi configuration for Android devices</p>";
echo "<p><img src='" . $qr->get_link() . "' border='0'/></p>";
//starting i-appli aplication which needs to be downloaded beforehand
//First parameter ADF - URL accessed to acquire the ADF of i-αppli to be activated
//Second parameter CMD command - The designated boot command must be declared within the AllowPushBy key of the ADF beforehand.
//Third parameter array of parameters - up to 16 parameters sent to the i-αppli to be activated
$param = array();
$param[] = array("name" => "name1", "value" => "value1");
$param[] = array("name" => "name2", "value" => "value2");
$qr->iappli("http://www.nttdocomo.co.jp/test_appli.jam", "abcde", $param);
echo "<p>i-appli activation</p>";
echo "<p><img src='" . $qr->get_link() . "' border='0'/></p>";
//encoding files like gif, jpg midi files in QR codes
//First parameter type - QR codes for support (image/gif, image/jpeg, application/x-mld, audio/midi, audio/mid, application/x-toruca)
//Second parameter size of file - the total bytes of content data using decimal code