PHP Classes
elePHPant
Icontem

QR Code Generate: Generate QRCode images using Google Charts API

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Info   Screenshots Screenshots   View files View files (6)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2014-05-02 (1 year ago) RSS 2.0 feedNot yet rated by the usersTotal: 553 This week: 1All time: 5,097 This week: 1,104Up
Version License PHP version Categories  
php-qrcode-generator 1.1GNU General Publi...5.2PHP 5, Graphics, Web services
Description Author  

This class can generate QRCode images using Google Charts API.

It can take as arguments many types of parameters of user contact details.

The class generates a string that includes parameters to pass to Google Charts API to generate an image of a QRCode.

It can return the generated Google Charts API URL or return HTML to display the QRCode image.

Picture of Pierre-Henry Soria
Name: Pierre-Henry Soria <contact>
Classes: 8 packages by
Country: ???
Age: ???
All time rank: 940
Week rank: 339 Up

Details provided by the author  
# QR Code

[![Scrutinizer Quality Score](https://scrutinizer-ci.com/g/pH-7/QRCode-Generator-PHP-Class/badges/quality-score.png?s=e469a64a9ac43a7b4233f5813a7078b08a5b6956)](https://scrutinizer-ci.com/g/pH-7/QRCode-Generator-PHP-Class/)

## Description

This **QRCode PHP class** allows you to easily generate a simple **QR code** using **vCard** 4.0 and the Google Chart API.

Here also two video explanation of QR code: http://www.youtube.com/watch?v=B3lrcOhmp9g and http://www.youtube.com/watch?v=IphTJHiKGos


## How to Use

Here's a basic example:

```php
<?php

require 'QRCode.class.php'; // Include the QRCode class

/**
 * If you have PHP 5.4 or higher, you can instantiate the object like this:
 * (new QRCode)->fullName('...')->... // Create vCard Object
 */
$oQRC = new QRCode; // Create vCard Object
$oQRC->fullName('Pierre-Henry Soria') // Add Full Name
    ->nickName('PH7') // Add Nickname
    ->gender('M') // Add Gender
    ->email('ph7software@gmail.com') // Add Email Address
    ->impp('phs_7@aol.com') // Add Instant Messenger
    ->url('http://ph-7.github.com') // Add URL Website
    ->note('Hello to all! I am a web developer. As hobbit, I like climbing and swimming ...') // Add Note
    ->categories('developer,designer,climber,swimmer') // Add Categories
    ->photo('http://files.phpclasses.org/picture/user/1122955.jpg') // Add Avatar
    ->lang('en-US') // Add Language
    ->finish(); // End vCard

// echo '<p><img src="' . $oQRC->get(300) . '" alt="QR Code" /></p>'; // Generate and display the QR Code
$oQRC->display(); // Display
```

You also have a sample file here: http://github.com/pH-7/QRCode-Generator-PHP-Class/blob/master/example.php


## Server Requirements

PHP 5.2.4 or higher.


## Author

Pierre-Henry Soria


## Contact

Contact me at: *ph7software [at] gmail.com*


## License

[General Public License 3](http://www.gnu.org/licenses/gpl.html) or later; See the LICENSE.txt file.
Screenshots  
  • QRCode
  Files folder image Files  
File Role Description
Accessible without login Plain text file example.php Example Example script
Accessible without login Plain text file LICENSE.txt Lic. License text
Plain text file QRCode.class.php Class Class source
Accessible without login Image file QRCode.png Icon Icon image
Accessible without login Image file QRCode2.png Icon Icon image
Accessible without login Plain text file README.md Doc. Documentation

 Version Control Unique User Downloads Download Rankings  
 85%Total:553All time:5,097
 This week:1This week:1,104Up