Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

QR codes? trying to find script

Posted on 2011-09-26
5
Medium Priority
?
472 Views
Last Modified: 2012-05-12
Hello, i'm finding all kinds of generator for qr codes, but what I need is a script that can reside on our site. The goal is: A user comes to the site, enters their contact information and all of the information is saved into the qr code. they get an "on the fly" qr code on the confirmation page which says " Thanks for signing up , print this out and bring into our store for a discount" it's mainly a feel good thing for the users. The staff will have thier info in the database already, but if they want, they can scan the qr code and get the info instantly.

Thanks in advance for any help!
0
Comment
Question by:remedy_rider
5 Comments
 
LVL 8

Assisted Solution

by:Rik-Legger
Rik-Legger earned 525 total points
ID: 36599490
0
 
LVL 111

Accepted Solution

by:
Ray Paseur earned 750 total points
ID: 36599729
Here's a demo script.
http://www.laprbass.com/RAY_qr_code.php?q=RAY+Paseur
<?php // RAY_qr_code.php
error_reporting(E_ALL);

// SEE http://code.google.com/apis/chart/infographics/docs/qr_codes.html

// IF THERE IS DATA
$q = NULL;
if (!empty($_GET["q"]))
{
    $q = $_GET["q"];
    $url
    = 'https://chart.googleapis.com/chart?'
    . 'cht=qr'
    . '&'
    . 'chs=33x33'
    . '&'
    . 'chl='
    . urlencode($q);
    ;
    header('Content-type: image/png');
    die( file_get_contents($url) );
}

$form = <<<FORM
Enter your name
<form>
<input name="q" value="$q" />
<input type="submit" />
</form>
FORM;

echo $form;

Open in new window

0
 
LVL 23

Assisted Solution

by:nemws1
nemws1 earned 225 total points
ID: 36599940
I usually use the Google generator that Rik-Legger posted for my own purposes, but if you want to generate them all in-house, this is what you want:

   http://phpqrcode.sourceforge.net/

It's simple and straightforward to use.

I'm mainly a Perl guy, so I used a similar library and I can generate QR codes right on my command line.  Very handy for quick notes. ;-)
0
 

Author Closing Comment

by:remedy_rider
ID: 36816782
when there are multiple answers that are pretty good, i never know how to award points. Is this fair.. I mainly used Ray's script but the others gave me good tips and info. I always get pulled on other projects so i couldn't even fully test this. I think it'll work though.
0
 
LVL 111

Expert Comment

by:Ray Paseur
ID: 36817767
Why did you mark the grade down to a "B" here?  I do not understand what was wrong or what more you expected from us.  You asked for "a script that can reside on our site."  I gave you a tested and working code example that resides on my site (I do not post untested examples without a clear warning).  I gave you a link to the script so you could test it.  Did you click the link to see how it works?  You can copy the script I posted here and install it on your own server.  Please read the grading guidelines here, thanks.  I do not think this deserved to be marked down to a "B" especially since you go the exact answer in the form of a working demonstration script.
http://www.experts-exchange.com/help.jsp#hs=29&hi=403 
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Make the most of your online learning experience.
Backups and Disaster RecoveryIn this post, we’ll look at strategies for backups and disaster recovery.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
Progress

971 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question