Got a tip via email from someone who read this that solved my problem. 
 Here is a PHP snippet that works:

        // Get the QR Code png file from google and display it
        $url = 
'https://www.google.com/chart?chs=200x200&chld=M|0&cht=qr&chl=otpauth://totp/'.$user_name.'@industrialwebapps.com%3Fsecret%3D'.$otp_key;
        $png = file_get_contents($url);
        $fn  = '/pdfs/test.png';
        $fh  = fopen('/var/www'.$fn, 'w');
        fwrite($fh, $png);
        fclose($fh);

        echo 'Google Authenticator Key: <b>'.$otp_key.'</b><br />';
        echo 'QR Code for some <a href="twoFactorAuth.php" 
target="_blank">Smart Phone apps.</a>: ';
        echo '<img src="'.$fn.'" />';

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-visualization-api/-/AQB-VeAmfBAJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-visualization-api?hl=en.

Reply via email to