FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » QR Code>/phpqrcode/qrlib.php
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: QR Code>/phpqrcode/qrlib.php [message #180157 is a reply to message #180154] Wed, 16 January 2013 15:27 Go to previous messageGo to previous message
Arno Welzel is currently offline  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
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: POST data being truncated at "
Next Topic: Problem with webservice call: org.xml.sax.SAXException
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Sep 19 22:23:51 GMT 2024

Total time taken to generate the page: 0.05482 seconds