?
Solved

how create qr code?

Posted on 2011-10-06
8
Medium Priority
?
472 Views
Last Modified: 2012-05-12
how create qr code image in php without use google api or another website , i need class help me to create image qr code from text with Privacy
0
Comment
Question by:YUYU
6 Comments
 
LVL 36

Accepted Solution

by:
Loganathan Natarajan earned 668 total points
ID: 36923120
Did you see this link? http://phpqrcode.sourceforge.net/
0
 
LVL 48

Assisted Solution

by:hernst42
hernst42 earned 668 total points
ID: 36923130
See e.g.
http://code.google.com/p/qrforall/ (requires a linux binary)
http://sourceforge.net/projects/phpqrclass/ (complete PHP code withour binary or remote service)
0
 
LVL 111

Assisted Solution

by:Ray Paseur
Ray Paseur earned 664 total points
ID: 36931089
JPGraph has some capabilities.  This little script shows how to call the Google interface.  You can install it on your server and test it, or run it on my server here.
http://www.laprbass.com/RAY_qr_code.php

Best regards, ~Ray
<?php // RAY_qr_code.php
error_reporting(E_ALL);

// GENERATE QR CODE IMAGES
// SEE http://code.google.com/apis/chart/infographics/docs/qr_codes.html

$q = NULL;

// IF THERE IS DATA
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:YUYU
ID: 37069322
I've requested that this question be deleted for the following reason:

no answer
0
 
LVL 111

Expert Comment

by:Ray Paseur
ID: 37069323
Eh?  The practical answer might be to use the Google interface (that is what I do and that is what I posted) however hernst42 posted a link to a self-contained native-PHP class for producing QR Codes in image or text (console or document) that uses no other files or modules.  This is exactly what you asked for.

I will post an objection so you can engage in some dialog or accept the correct answers.  Good luck with your project, ~Ray
0
 
LVL 111

Expert Comment

by:Ray Paseur
ID: 37080591
Useful answers can be found at http:#36923130 and http:#36931089
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
This article discusses how to implement server side field validation and display customized error messages to the client.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to dynamically set the form action using jQuery.
Suggested Courses
Course of the Month15 days, 9 hours left to enroll

850 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