Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

QR codes? trying to find script

Posted on 2011-09-26
5
Medium Priority
?
462 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

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

Containers like Docker and Rocket are getting more popular every day. In my conversations with customers, they consistently ask what containers are and how they can use them in their environment. If you’re as curious as most people, read on. . .
Make the most of your online learning experience.
The viewer will learn how to dynamically set the form action using jQuery.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

664 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