PHPackages                             rogersxd/vcard - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. rogersxd/vcard

ActiveProject[Utility &amp; Helpers](/categories/utility)

rogersxd/vcard
==============

Generate vCards fast.

1.0.2(7y ago)84.9k↓16.7%1MITPHPPHP &gt;=5.6

Since Jul 15Pushed 7y ago1 watchersCompare

[ Source](https://github.com/rogersxd/vcard)[ Packagist](https://packagist.org/packages/rogersxd/vcard)[ RSS](/packages/rogersxd-vcard/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (4)Used By (0)

VCard PHP library
=================

[](#vcard-php-library)

[![Latest Stable Version](https://camo.githubusercontent.com/4d9dfc7da7a8c1bd23fcabc2ea881a103d5213526002990998dd6b926467ba05/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7061636b61676973742d76312e302e322d626c75652e737667)](https://packagist.org/packages/rogersxd/vcard)[![License](https://camo.githubusercontent.com/5a911ddcd16b9110e7821386ffd8d637005a8b856c14a3c0861b955e91da4eba/687474703a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d6c69676874677265792e737667)](https://github.com/rogersxd/vcard/master/LICENSE)[![Build Status](https://camo.githubusercontent.com/ab1c7ffd7b09111fb065c6cd2ceffa052c43351ed7b9186e6fa9632f9298f076/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f726f6765727378642f76636172642f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/rogersxd/vcard/?branch=master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/23efeeb9e8819a7bb715a87b792b989634607334428e3d084351802fea32d7ac/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f726f6765727378642f76636172642f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/rogersxd/vcard/?branch=master)

VCard PHP library. Only VCF files.

Usage
-----

[](#usage)

### Installation

[](#installation)

```
composer require rogersxd/vcard
```

> This will install the latest version of vcard with [Composer](https://getcomposer.org)

### Example

[](#example)

```
use Rogersxd\VCard\VCard;

$vcard = new VCard();

$vcard->addPhoto(__DIR__ .'/images/rogerscorrea.jpg');

$lastName = 'Corrêa';
$firstName = 'Rogers';
$additional = '';
$prefix = '';
$suffix = '';
$fullName = true;

$vcard->addnames(
        $lastName,
        $firstName,
        $additional,
        $prefix,
        $suffix,
        $fullName
);

$vcard->addPhone('+5551999999999', 'CELL');

$vcard->addPhone('+555133333333', 'HOME');

$vcard->addJobtitle('Banking');

$vcard->addRole('Developer');

$vcard->addEmail('rogersgbc@gmail.com');

$vcard->addCompany('XYZ');

$vcard->addUrl('http://rogerscorrea.wordpress.com');

$vcard->addUrl('https://github.com/rogersxd');

$vcard->addNote('CUSTOM-NOTE: TEST VCARD');

$vcard->addBirthday('YYYY-MM-DD');

$name = '';
$extended = '';
$street = 'Francisco Martins, 123';
$city = 'Porto Alegre';
$region = 'RS';
$zip = '91712-150';
$country = 'BR';
$type = 'HOME';

$vcard->addAddress(
    $name,
    $extended,
    $street,
    $city,
    $region,
    $zip,
    $country,
    $type
);

$socialProfile1 = 'https://facebook.com/';
$typeSocialProfile1 = 'facebook';

$socialProfile2 = 'https://instagram.com/';
$typeSocialProfile2 = 'instagram';

$socialProfile3 = 'https://twitter.com/';
$typeSocialProfile3 = 'twitter';

$socialProfile4 = 'https://linkedin.com/';
$typeSocialProfile4 = 'linkedin';

$vcard->addSocialProfile(
    $socialProfile1,
    $typeSocialProfile1
);

$vcard->addSocialProfile(
    $socialProfile2,
    $typeSocialProfile2
);

$vcard->addSocialProfile(
    $socialProfile3,
    $typeSocialProfile3
);

$vcard->addSocialProfile(
    $socialProfile4,
    $typeSocialProfile4
);

$vcard->addCustom('X-CUSTOM(CHARSET=UTF-8,ENCODING=QUOTED-PRINTABLE,Custom1)','1');

$vcard->setSavePath(__DIR__. '/vcf/');

$vcard->save();
```

Documentation
-------------

[](#documentation)

The class is well documented inline.

Contributing
------------

[](#contributing)

Contributions are **welcome** and will be fully **credited**.

### Pull Requests

[](#pull-requests)

> To add or update code

- **Coding Syntax** - Please keep the code syntax consistent with the rest of the package.
- **Add unit tests!** - Your patch won't be accepted if it doesn't have tests.
- **Document any change in behavior** - Make sure the README and any other relevant documentation are kept up-to-date.
- **Consider our release cycle** - We try to follow [semver](http://semver.org/). Randomly breaking public APIs is not an option.
- **Create topic branches** - Don't ask us to pull from your master branch.
- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests.
- **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please squash them before submitting.

### Issues

[](#issues)

> For bug reporting or code discussions.

More info on how to work with GitHub on help.github.com.

Credits
-------

[](#credits)

- [Rogers Corrêa](https://github.com/rogersxd)
- [All Contributors](https://github.com/rogersxd/vcard/contributors)

License
-------

[](#license)

The module is licensed under [MIT](./LICENSE.md). In short, this license allows you to do everything as long as the copyright statement stays present.

###  Health Score

32

—

LowBetter than 71% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

2853d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/78f0a88fea3b5d440edc0af95d9e7a3b93b53d7e7e09c92230c6995ed9a00990?d=identicon)[rogersxd](/maintainers/rogersxd)

---

Top Contributors

[![rogersxd](https://avatars.githubusercontent.com/u/7267272?v=4)](https://github.com/rogersxd "rogersxd (2 commits)")

---

Tags

phplaravelvCardvcf

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/rogersxd-vcard/health.svg)

```
[![Health](https://phpackages.com/badges/rogersxd-vcard/health.svg)](https://phpackages.com/packages/rogersxd-vcard)
```

###  Alternatives

[jeroendesloovere/vcard

This VCard PHP class can generate a vCard with some data. When using an iOS device it will export as a .ics file because iOS devices don't support the default .vcf files.

5193.6M12](/packages/jeroendesloovere-vcard)[astrotomic/laravel-vcard

A fluent builder class for vCard files.

5330.0k](/packages/astrotomic-laravel-vcard)[jeroendesloovere/vcard-bundle

This Symfony 2 bundle can generate vCards with lots of data. When using an &lt; iOS 7 device it will export as a .ics file because iOS devices don't support the default .vcf files.

1677.3k3](/packages/jeroendesloovere-vcard-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
