Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

QR Code>/phpqrcode/qrlib.php

305 views
Skip to first unread message

Bud Nusly

unread,
Jan 16, 2013, 2:56:44 AM1/16/13
to
Hi:
I'm trying to use phpqrcode/qrlib.php to generate a QR for VCARD but the png created when scanned doesn't give all the information. Here's my code:
QRcode::png('BEGIN:VCARD\r\n
VERSION:3.0\r\n
N:Gump;Forrest\r\n
FN:Forrest Gump\r\n
TEL;WORK;VOICE:(111) 555-1212\r\n
TEL;HOME;VOICE:(404) 555-1212\r\n
REV:20130116T195243Z\r\n
END:VCARD', 'promo/QR/test.png');

When scanned the Metadata shows "L" whereas a QR generated with an on-line service shows "M"
Any pointers?
TIA

Jerry Stuckle

unread,
Jan 16, 2013, 6:17:25 AM1/16/13
to
Yes, try the support forum for the project. They know their code better
than anyone else, and if there is a problem, they can fix it better than
anyone else.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstu...@attglobal.net
==================

Arno Welzel

unread,
Jan 16, 2013, 10:27:21 AM1/16/13
to
Am 16.01.2013 08:56, schrieb Bud Nusly:

> Hi:
> I'm trying to use phpqrcode/qrlib.php to generate a QR for VCARD but the png created when scanned doesn't give all the information. Here's my code:
> QRcode::png('BEGIN:VCARD\r\n
> VERSION:3.0\r\n
> N:Gump;Forrest\r\n
> FN:Forrest Gump\r\n
> TEL;WORK;VOICE:(111) 555-1212\r\n
> TEL;HOME;VOICE:(404) 555-1212\r\n
> REV:20130116T195243Z\r\n
> END:VCARD', 'promo/QR/test.png');

Well '\n\r' does not mean "newline" literally "backslash n backslash r".
Everything in single quotes is used without any substitudion of escape
sequences or avariables. You have to use double quotes if you want to
pass CR/LF using \r\n.

Also you must not wrap a string over multiple lines with spaces in
between. So a better way:

QRcode::png("BEGIN:VCARD\r\n".
"VERSION:3.0\r\n".
"N:Gump;Forrest\r\n".
"FN:Forrest Gump\r\n".
"TEL;WORK;VOICE:(111) 555-1212\r\n".
"TEL;HOME;VOICE:(404) 555-1212\r\n".
"REV:20130116T195243Z\r\n".
"END:VCARD",
'promo/QR/test.png');

> When scanned the Metadata shows "L" whereas a QR generated with an on-line service shows "M"

"L" is the ECC level. You can pass this as parameter.

> Any pointers?

See <http://phpqrcode.sourceforge.net/>.


--
Arno Welzel
http://arnowelzel.de
http://de-rec-fahrrad.de

Bud Nusly

unread,
Jan 16, 2013, 10:48:07 AM1/16/13
to
THANK YOU, Arno! Solved my problem. :-))
0 new messages