hackalive Posted November 13, 2011 Share Posted November 13, 2011 I am using this QRCode https://github.com/jeromeetienne/jquery-qrcode. No I need to turn it into an image so I can use it like <img src="qrcode.php"> I have added "header("Content-type: image/png");" but I cannot get this to work. Any and all help/advice is greatly appreciated. It is starting to really annoy me Cheers in advance. Quote Link to comment https://forums.phpfreaks.com/topic/251059-php-image/ Share on other sites More sharing options...
hackalive Posted November 13, 2011 Author Share Posted November 13, 2011 gettin the QRcode to save as a temp image would also be a solution if anyone can tell me how to do it Quote Link to comment https://forums.phpfreaks.com/topic/251059-php-image/#findComment-1287825 Share on other sites More sharing options...
hackalive Posted November 13, 2011 Author Share Posted November 13, 2011 If we were to do a save, it would need to be server side. Quote Link to comment https://forums.phpfreaks.com/topic/251059-php-image/#findComment-1287831 Share on other sites More sharing options...
PFMaBiSmAd Posted November 13, 2011 Share Posted November 13, 2011 The qrcode.php file is just the class definition. You would need to include/require it and then call the methods along with outputting the header, followed by the image data. Did you read through the examples at the page where you got the grcode.php file - http://d-project.googlecode.com/svn/trunk/misc/qrcode/php/ Quote Link to comment https://forums.phpfreaks.com/topic/251059-php-image/#findComment-1287832 Share on other sites More sharing options...
hackalive Posted November 13, 2011 Author Share Posted November 13, 2011 This is the current code <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script> <script type="text/javascript" src="../js/qrcode.js"></script> <?php header("Content-type: image/png"); ?> <div id="qrcode"></div> <script> jQuery('#qrcode').qrcode({ width: 60, height: 60, text : "1" }); </script> If i was to visit http://mysite.com/qr.php I see the QRcode if i try to use <img src="http://mysite.com/qr.php"> it does not work! Quote Link to comment https://forums.phpfreaks.com/topic/251059-php-image/#findComment-1287833 Share on other sites More sharing options...
hackalive Posted November 13, 2011 Author Share Posted November 13, 2011 I have it working, sort of, based on the link you gave. Can I ask where you found that link and are there any instructions on sizing? Quote Link to comment https://forums.phpfreaks.com/topic/251059-php-image/#findComment-1287835 Share on other sites More sharing options...
PFMaBiSmAd Posted November 13, 2011 Share Posted November 13, 2011 The link you posted in the first post mentions - It is based on a library which build qrcode in various language. The library link goes to a google page with a php source link (which is the link I posted) on it. Quote Link to comment https://forums.phpfreaks.com/topic/251059-php-image/#findComment-1287837 Share on other sites More sharing options...
hackalive Posted November 13, 2011 Author Share Posted November 13, 2011 do you have any clues as to a PHP reader for QRcode? Quote Link to comment https://forums.phpfreaks.com/topic/251059-php-image/#findComment-1287838 Share on other sites More sharing options...
PFMaBiSmAd Posted November 13, 2011 Share Posted November 13, 2011 Have you tried searching the Internet for - php qr code decoder Quote Link to comment https://forums.phpfreaks.com/topic/251059-php-image/#findComment-1287840 Share on other sites More sharing options...
hackalive Posted November 13, 2011 Author Share Posted November 13, 2011 can find plenty of generators but not PHP decorders Quote Link to comment https://forums.phpfreaks.com/topic/251059-php-image/#findComment-1287841 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.