#Confirmed on CentOS 6(Not in CentOS 5)
yum install -y qrencode
# Ubuntu 20.Confirmed at 04
apt install -y qrencode
When making an image
qrencode -o a.png "http://qiita.com"
When outputting to the terminal
qrencode -t ansi "http://qiita.com"
qr.php
<?php
function echo_qrcode($str) {
        $command = sprintf('/usr/bin/qrencode "%s" -o -', $str);
        $qrcode = `$command`;
        header("Content-type: image/png");
        echo $qrcode;
}
echo_qrcode("https://www.google.com/search?client=ubuntu&hs=M8b&channel=fs");
        Recommended Posts