Solved

QR codes? trying to find script

Posted on 2011-09-26
5
430 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
ID: 36599490
0
 
LVL 109

Accepted Solution

by:
Ray Paseur earned 250 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 75 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 109

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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

803 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