Solved

QR codes? trying to find script

Posted on 2011-09-26
5
420 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 175 total points
Comment Utility
0
 
LVL 108

Accepted Solution

by:
Ray Paseur earned 250 total points
Comment Utility
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 75 total points
Comment Utility
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
Comment Utility
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 108

Expert Comment

by:Ray Paseur
Comment Utility
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

A short article about a problem I had getting the GPS LocationListener working.
These days socially coordinated efforts have turned into a critical requirement for enterprises.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

763 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now