I'm using the QR google api to create QR codes but would like the ability to download the image in PHP. I've looked online but can't seem to find anything helpful. Any suggestions?
I'm creating the QR code like so:
function generateQR($url, $width = 150, $height = 150) {
$url = urlencode($url);
$image = '<img src="http://chart.apis.google.com/chart?chs='.$width.'x'.$height.'&cht=qr&chl='.$url.'" alt="QR code" width="'.$width.'" height="'.$height.'"/>';
return $image;
}
echo(generateQR('http://google.com'));