Jump to content

Recommended Posts

Posted

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.

 

 

Screenshot 2025-08-16 at 4.50.27 PM.png

Posted

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.

 

Posted

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.

Screenshot 2025-08-17 at 6.37.59 PM.png

Posted

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:&nbsp;<input name="data" value="like_that" />&nbsp;
        ECC:&nbsp;<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>&nbsp;
        Size:&nbsp;<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>&nbsp;
        <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.

 

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.