PHPackages                             dastanaron/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. dastanaron/vcard

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

dastanaron/vcard
================

This VCard PHP class can generate a vCard with some data. This is fork of the popular library https://github.com/jeroendesloovere/vcard

1.7.3.4(5y ago)043MITPHPPHP &gt;=5.5

Since Apr 2Pushed 5y agoCompare

[ Source](https://github.com/dastanaron/vcard)[ Packagist](https://packagist.org/packages/dastanaron/vcard)[ Docs](https://github.com/dastanaron/vcard)[ RSS](/packages/dastanaron-vcard/feed)WikiDiscussions master Synced yesterday

READMEChangelog (4)Dependencies (2)Versions (33)Used By (0)

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

[](#vcard-php-library)

[![Latest Stable Version](https://camo.githubusercontent.com/e921e074a2a71ef92c67778c793a34169af5649b0b09e8c2406647b306305b31/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f64617374616e61726f6e2f76636172642e737667)](https://packagist.org/packages/dastanaron/vcard)[![License](https://camo.githubusercontent.com/5a911ddcd16b9110e7821386ffd8d637005a8b856c14a3c0861b955e91da4eba/687474703a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d6c69676874677265792e737667)](https://github.com/dastanaron/vcard/blob/master/LICENSE)[![donate](https://camo.githubusercontent.com/c194e62352786f0291d1395cbc8ab52abfa013184147d06c5bdfca6fd2706408/68747470733a2f2f66727365727665722e72752f696d672f636f666665652e706e67)](http://qiwi.com/n/MISIT616)

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

**NOTE**: We are working on a complete new version to work with vCard version 4.0, with extreme good code quality. [Check out the new version](https://github.com/jeroendesloovere/vcard/tree/2.0.0-dev)

Usage
-----

[](#usage)

### Installation

[](#installation)

```
composer require dastanaron/vcard
```

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

### Test

[](#test)

1. Clone this project
2. `cd` to the project folder
3. Run command:

```
./run_test.sh
```

### Example

[](#example)

> [View all examples](/examples/example.php) or check [the VCard class](/src/VCard.php).

### Parsing examples

[](#parsing-examples)

The parser can either get passed a VCard string, like so:

```
// load VCardParser classes
use Dastanaron\VCard\VCardParser;

$parser = new VCardParser($vcardString);
echo $parser->getCardAtIndex(0)->fullname; // Prints the full name.
```

Or by using a factory method with a file name:

```
$parser = VCardParser::parseFromFile('path/to/file.vcf');
echo $parser->getCardAtIndex(0)->fullname; // Prints the full name.
```

> [View the parsing example](/examples/example_parsing.php) or check the [the VCardParser class](/src/VCardParser.php) class.

**Support for frameworks**

I've created a Symfony Bundle: [VCard Bundle](https://github.com/jeroendesloovere/vcard-bundle)

Usage in for example: Laravel

```
return Response::make(
    $this->vcard->getOutput(),
    200,
    $this->vcard->getHeaders(true)
);
```

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

[](#documentation)

The class is well documented inline. If you use a decent IDE you'll see that each method is documented with PHPDoc.

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)

- [Jeroen Desloovere](https://github.com/jeroendesloovere)
- [Dastanaron](https://github.com/dastanaron)
- [All Contributors](https://github.com/jeroendesloovere/vcard/contributors)

License
-------

[](#license)

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

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 78.7% 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 ~82 days

Recently: every ~165 days

Total

31

Last Release

1967d ago

PHP version history (3 changes)1.1.0PHP &gt;=5.3.3

1.7.3PHP &gt;=5.4

1.7.3.2PHP &gt;=5.5

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/25330618?v=4)[Github](/maintainers/dastanaron)[@dastanaron](https://github.com/dastanaron)

---

Top Contributors

[![jeroendesloovere](https://avatars.githubusercontent.com/u/588616?v=4)](https://github.com/jeroendesloovere "jeroendesloovere (192 commits)")[![wadmiraal](https://avatars.githubusercontent.com/u/745643?v=4)](https://github.com/wadmiraal "wadmiraal (13 commits)")[![Synchro](https://avatars.githubusercontent.com/u/81561?v=4)](https://github.com/Synchro "Synchro (7 commits)")[![h44z](https://avatars.githubusercontent.com/u/1370804?v=4)](https://github.com/h44z "h44z (5 commits)")[![dastanaron](https://avatars.githubusercontent.com/u/25330618?v=4)](https://github.com/dastanaron "dastanaron (3 commits)")[![therouv](https://avatars.githubusercontent.com/u/393419?v=4)](https://github.com/therouv "therouv (3 commits)")[![Lidbetter](https://avatars.githubusercontent.com/u/6525616?v=4)](https://github.com/Lidbetter "Lidbetter (3 commits)")[![Jako](https://avatars.githubusercontent.com/u/148371?v=4)](https://github.com/Jako "Jako (2 commits)")[![christianruhstaller](https://avatars.githubusercontent.com/u/13237645?v=4)](https://github.com/christianruhstaller "christianruhstaller (2 commits)")[![claudusd](https://avatars.githubusercontent.com/u/3321326?v=4)](https://github.com/claudusd "claudusd (2 commits)")[![mgrundkoetter](https://avatars.githubusercontent.com/u/1526725?v=4)](https://github.com/mgrundkoetter "mgrundkoetter (2 commits)")[![Stadly](https://avatars.githubusercontent.com/u/7263579?v=4)](https://github.com/Stadly "Stadly (2 commits)")[![yuks](https://avatars.githubusercontent.com/u/2283558?v=4)](https://github.com/yuks "yuks (1 commits)")[![ch-feedbackpeople](https://avatars.githubusercontent.com/u/40589559?v=4)](https://github.com/ch-feedbackpeople "ch-feedbackpeople (1 commits)")[![fetchandadd](https://avatars.githubusercontent.com/u/15845152?v=4)](https://github.com/fetchandadd "fetchandadd (1 commits)")[![joshk](https://avatars.githubusercontent.com/u/8701?v=4)](https://github.com/joshk "joshk (1 commits)")[![muhammetus](https://avatars.githubusercontent.com/u/5948976?v=4)](https://github.com/muhammetus "muhammetus (1 commits)")[![sajjadrad](https://avatars.githubusercontent.com/u/1608837?v=4)](https://github.com/sajjadrad "sajjadrad (1 commits)")[![SimonHeimberg](https://avatars.githubusercontent.com/u/16302148?v=4)](https://github.com/SimonHeimberg "SimonHeimberg (1 commits)")[![bartgloudemans](https://avatars.githubusercontent.com/u/411451?v=4)](https://github.com/bartgloudemans "bartgloudemans (1 commits)")

---

Tags

phpgeneratorvCardvcf

###  Code Quality

TestsPHPUnit

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/dastanaron-vcard/health.svg)](https://phpackages.com/packages/dastanaron-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)[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)[tomloprod/radiance

A deterministic mesh gradient avatar generator for PHP.

1393.7k](/packages/tomloprod-radiance)

PHPackages © 2026

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