Home »
Imported messages »
comp.lang.php »
QR Code>/phpqrcode/qrlib.php
Re: QR Code>/phpqrcode/qrlib.php [message #180157 is a reply to message #180154] |
Wed, 16 January 2013 15:27 |
Arno Welzel
Messages: 317 Registered: October 2011
Karma:
|
Senior Member |
|
|
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
|
|
|
Goto Forum:
Current Time: Wed Nov 27 08:36:13 GMT 2024
Total time taken to generate the page: 0.04734 seconds