Mcloide's resources library

All about PHP, Javascript, concepts and development

Posts Tagged ‘vcard’

Vcard Generator

Posted by mcloide on September 17, 2008

You can always create a Vcard on your own or you can use an generator.

Creating a Vcard is not hard, you will only need to replace the following code with your information and save it into a .vcf file (text file, change extension).

BEGIN:VCARD
   FN:Mr. John P. Smith, Jr.
   TITLE:General Manager
   ORG:XYZ Corp.;North American Division;Manufacturing
   ADR;POSTAL;WORK:;;P.O. Box 10010;AnyCity;AnyState;00000;U.S.A.
   LABEL;POSTAL;WORK;ENCODING=QUOTED-PRINTABLE:P.O. Box 10010=0D=0A=
    Anywhere, TN  37849=0D=0A=
    U.S.A.
   ADR;PARCEL;WORK:;133 Anywhere St.;Suite 360;AnyCity;AnyState;00000;U.S.A.
   LABEL;POSTAL;WORK;ENCODING=QUOTED-PRINTABLE:133 Anywhere St.=0D=0A=
    Anywhere, TN  37849=0D=0A=
    U.S.A.
   TEL;Work;VOICE;MESG;PREF:+1-234-456-7891 x56473
   TEL;Home:+1-234-456-7891
   TEL;Pager:+1-234-456-7891
   TEL;Cell:+1-234-456-7891
   TEL;Modem;FAX:+1-234-456-7891,,*3
   EMAIL;Internet:webmaster@anywhere.com
   URL:http://www.anywhere.com/mrh.vcf
   UID:http://www.anywhere.com/mrh.vcf
   TZ:-0500
   BDAY:1997-11-29
   REV:20080917T102319
   VERSION:2.1
END:VCARD

Or you can use a Vcard generator and there inst no other one betther than this one: http://www.vicintl.com/vcf/

I use a lot of Vcards to send to friends, clients, fellow developers, etc. It’s easier and saves automaticly on email clients like Outlook.

Have fun.

Posted in development, resources | Tagged: , | 7 Comments »

Vcard

Posted by mcloide on August 26, 2008

vcard

I have build a very simple class that parses a Vcard file type. The class will read a file with a Vcard, parse all information in it and output an array with the information. Once you get the array you can easily access it and uses it’s information for another class such as user or contacts.

The class is bellow and you can use it, modify it, just make a reference where you got it from (thanks): Vcard.zip


# The class is very simple, it will build an array with all the information of the Vcard
# This is an example of the return of the parser

Array
(
[name] => Array
(
[lastname] => Robot
[firstname] => Tired
[middlename] =>
)
[fullname] => Tired Robot
[business] => Tired Robot Blog
[title] => Blog Picture
[note] => Any notes associated with this contact
[phone] => 5615615561
[home] => 5615615562
[cell] => 5615615563
[fax] => 5615615564
[address] => Array
(
[0] => 1234 NW Street with no Name St
[1] => Deerfield Beach
[2] => FL
[3] => 33442
[4] => United States
)

[url] => mcloide.wordpress.com
[email] => info@mcloide.wordpress.com
)
*/

Posted in PHP, resources | Tagged: , , , | 1 Comment »