CodeIgniter Forums
QRCode Generator v1.0 - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22)
+--- Thread: QRCode Generator v1.0 (/showthread.php?tid=13742)

Pages: 1 2 3


QRCode Generator v1.0 - El Forum - 12-03-2008

[eluser]Bob Sawyer[/eluser]
Greetings, all. This is my first official contribution to the cause. The full monty can be found in the wiki. This will serve as the support thread, at least for now. You can also contact me with questions but in the interest of public knowledge, try to keep it all here.

Cheers,
Bob


QRCode Generator v1.0 - El Forum - 12-03-2008

[eluser]dexcell[/eluser]
Thank you, this is useful for me.
i tried to scan the image with japanese cell phone, it works Big Grin


QRCode Generator v1.0 - El Forum - 12-04-2008

[eluser]andreagam[/eluser]
@Bob: Cool contribution, Bob. I will experiment a bit in my spare time...

@Dexcell: Wow, when my eyes fall on your cat I get hypnotized everytime :-)


QRCode Generator v1.0 - El Forum - 12-04-2008

[eluser]xwero[/eluser]
FYI the google chart api offers a QR image too, an example http://chart.apis.google.com/chart?cht=qr&chl=hello world&choe=UTF-8&chs=300x200. The benefit of the chart api is that you don't need to store the image on your server but the you have to trust the service to be up and running.


QRCode Generator v1.0 - El Forum - 12-04-2008

[eluser]Bob Sawyer[/eluser]
[quote author="xwero" date="1228399830"]FYI the google chart api offers a QR image too, an example http://chart.apis.google.com/chart?cht=qr&chl=hello world&choe=UTF-8&chs=300x200. The benefit of the chart api is that you don't need to store the image on your server but the you have to trust the service to be up and running.[/quote]

Cool, thanks for the link. I wasn't aware of the Google Chart one, but I'm certainly not surprised that they have one. :-) My experience with Google though leads me to believe that mine is easier to implement. Plus, the application I created this for requires that the images are saved to the server.

Still, appreciate you pointing that out. Never hurts to have more than one screwdriver in the toolbox. :-)

Cheers,
Bob


QRCode Generator v1.0 - El Forum - 12-04-2008

[eluser]xwero[/eluser]
i don't think your helper is easier to implement because with the google charting api it's just the url and that is it. The url returns an image. You can try it by copy pasting the example i provided. You have a three step installation instructions Wink

But as you pointed out your helper saves images to the server and it seems to have more options.


QRCode Generator v1.0 - El Forum - 12-04-2008

[eluser]Bob Sawyer[/eluser]
[quote author="xwero" date="1228428285"]i don't think your helper is easier to implement because with the google charting api it's just the url and that is it. [/quote]

Hehehe, good point.


QRCode Generator v1.0 - El Forum - 12-04-2008

[eluser]steelaz[/eluser]
Very cool, I didn't even know cellphones do that. Thank you for contributing.


QRCode Generator v1.0 - El Forum - 02-17-2009

[eluser]yesov[/eluser]
hello, i find one bug.

Code:
...
/* --- attach data */
        
$i=0;
while ($i<$max_codewords){
    $codeword_i=$codewords[$i];
    $j=8;
    while ($j>=1){
        $codeword_bits_number=($i << 3) +  $j;
        $matrix_content[ $matrix_x_array[$codeword_bits_number] ][ $matrix_y_array[$codeword_bits_number] ]=((255*($codeword_i & 1)) ^ $mask_array[$codeword_bits_number] );
        $codeword_i= $codeword_i >> 1;
        $j--;
    }
    $i++;
}
...
and sometime i have a php error:
Undefined offset in line with
Code:
$codeword_i=$codewords[$i];
and i change this line to this
Code:
$codeword_i=@$codewords[$i];



QRCode Generator v1.0 - El Forum - 02-17-2009

[eluser]Bob Sawyer[/eluser]
Hi yesov,

Interesting, I hadn't run into any problems with it, but good catch. You might want to report that to the original author of the generator script - I didn't write that, but merely ported it to CI.

Cheers,
Bob