rcacciato Posted August 16 Posted August 16 I have a database where I am creating QR codes with URLs for our customers to place orders. I've been using a free service called qrserver.com and have been using this script around this (I can't recall where I found the script): Set Variable [ $theURL; Value:"https://api.qrserver.com/v1/create-qr-code/?size=150x150&data="&qrgen::orderurl ] #Make sure the field you are inserting into is on the layout that the script is running from. #----MODIFY FIELDS---- Insert from URL [ qrgen::QR Code; $theURL ] [ Select; No dialog ] #Turn this on for troubleshooting. If something is wrong, you will see some error information coming back from Google. // Open URL [ $theURL ] [ No dialog ] Unfortunately when I ran the script today it hung on the URL Data Transfer script saying "Transferring" (see screenshot). When I went to the qrserver.com website nothing came up, so they must have shut this down for whatever reason. Does anybody else have any ideas how to generate QR codes for free? This is an important part of our system. Thanks in advance.
comment Posted August 16 Posted August 16 There are many APIs providing QR codes to choose from. Alternatively you could implement some Javascript code in a web viewer - though that could be a bit tricky if you're still on version 16.
rcacciato Posted August 17 Author Posted August 17 Thanks. I found this: https://sourceforge.net/projects/phpqrcode/ I've installed it on our server and it works great. My script is as follows, where server.com is my server (sorry it's not the real url since I don't want anybody generating orders!) and qrgen::orderurl is the url which loads the order page: Set Variable [ $theURL; Value:"https://server.com/phpqrcode/index.php?data="&qrgen::orderurl ] #Make sure the field you are inserting into is on the layout that the script is running from. #----MODIFY FIELDS---- Insert from URL [ qrgen::QR Code; $theURL ] [ Select ] #Turn this on for troubleshooting. If something is wrong, you will see some error information coming back from Google. // Open URL [ $theURL ] [ No dialog ] If I copy the value of $theURL and paste it into a browser, the correct QR code is generated. But when I run the script it pastes the Textmate icon (I use Textmate as my text editor) and not the QR code into the field like the screenshot. It's odd because with the api.qrserver.com url the QR code was pasted perfectly. I've tried turning "automatically encode URL" off but that doesn't work, same error. Any idea what I may be doing wrong here? I'm totally baffled since this worked before. Thanks.
rcacciato Posted August 18 Author Posted August 18 ps: here's a url if you would like to try it: https://www.blue-iceberg.com/qrtest/index.php
comment Posted August 18 Posted August 18 The URL you are using does not insert an image file into the target container. It inserts a plain-text file with a .php extension, containing: <h1>PHP QR Code</h1><hr/><img src="temp/test1df79d71d92e5295995c5f63318b56d2.png" /><hr/><form action="index.php" method="post"> Data: <input name="data" value="like_that" /> ECC: <select name="level"> <option value="L" selected>L - smallest</option> <option value="M">M</option> <option value="Q">Q</option> <option value="H">H - best</option> </select> Size: <select name="size"><option value="1">1</option><option value="2">2</option><option value="3">3</option><option value="4" selected>4</option><option value="5">5</option><option value="6">6</option><option value="7">7</option><option value="8">8</option><option value="9">9</option><option value="10">10</option></select> <input type="submit" value="GENERATE"></form><hr/><table cellpadding="3" cellspacing="1"> <thead><tr style="border-bottom:1px solid silver"><td colspan="2" style="text-align:center">BENCHMARK</td></tr></thead> <tbody><tr><th style="text-align:right">till after_raw: </th><td>0.001343s</td></tr><tr><th style="text-align:right">till after_filler: </th><td>0.000430s</td></tr><tr><th style="text-align:right">till after_mask: </th><td>0.007916s</td></tr><tr><th style="text-align:right">till after_encode: </th><td>0.000022s</td></tr><tr><th style="text-align:right">till finish: </th><td>0.001003s</td></tr></tbody><tfoot> <tr style="border-top:2px solid black"><th style="text-align:right">TOTAL: </th><td>0.010714s</td></tr> </tfoot> </table> You need a URL that links to the image file itself.
Ocean West Posted August 19 Posted August 19 https://blog.foxtailtech.com/post/102136387485/lab-barcode-api-for-filemaker-generate-free
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now