Solved

QR codes? trying to find script

Posted on 2011-09-26
5
432 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to check if a session is disconnected in php 9 31
Accessing specific element - DOM PHP HTML 8 34
PHP 5.6 and 7.x 4 18
AvlTree-Node Data type 4 8
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
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…

789 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