Skip to content

Instantly share code, notes, and snippets.

@elialejandro
Created October 28, 2014 18:06
Show Gist options
  • Save elialejandro/cc4b5d7bb12e1dc52bc1 to your computer and use it in GitHub Desktop.
Save elialejandro/cc4b5d7bb12e1dc52bc1 to your computer and use it in GitHub Desktop.
Generar un código QR con la API de Google Chart e imprimir la imagen en formato String para no mostrar la url que le genera.
<?php
$contents = file_get_contents("https://chart.googleapis.com/chart?chs=150x150&cht=qr&chl=hola");
echo '<img src="data:image/png;base64,'. base64_encode($contents) .'">';
@miltonce007
Copy link

Consulta, tienen el nuevo servicio de google para generar QR?
Gracias

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment