PHPackages                             communify/communify-php - 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. communify/communify-php

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

communify/communify-php
=======================

Communify PHP integration package.

120.9kPHP

Since May 6Pushed 11mo ago10 watchersCompare

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

READMEChangelogDependenciesVersions (5)Used By (0)

Communify SDK for PHP
=====================

[](#communify-sdk-for-php)

The **Communify SDK for PHP** enables PHP developers to use \[Communify Web Services\]\[communify\] in their PHP code. You can get started in minutes by \[installing the SDK through Composer\]\[docs-installation\] or by downloading a single zip or phar file from our \[latest release\]\[latest-release\].

1. Features
-----------

[](#1-features)

- Single Sign On (S2O)
- Search Engine Optimization (SEO)
- Email After Purchase (EAP)

2. Getting Started
------------------

[](#2-getting-started)

1. **Sign up for Communify**
2. **Minimum requirements**
3. **Get your AccountId**
4. **Install the SDK**

### 2.1. Sign up for Communify

[](#21-sign-up-for-communify)

Go to , create your account, and enable Single Sign On login at Membership preferences. To enable single sign on go to Settings/Membership.

### 2.2. Get your Account Id

[](#22-get-your-account-id)

Go to settings/Integration to get it:

```

```

### 2.3. Minimum requirements

[](#23-minimum-requirements)

- PHP version: &gt;= 5.3.0
- Guzzle: 3.7
- Mustache: 2.5

### 2.4. Install the SDK

[](#24-install-the-sdk)

#### 2.4.1. Using composer

[](#241-using-composer)

Modify composer.json:

```
{
    "require": {
        "communify/communify-php": "dev-master",
    }
}
```
Execute composer update.

#### 2.4.2. Without using composer
Download SDK: https://s3-us-west-2.amazonaws.com/communify-ops/releases/master/communify_sdk.zip. Add communify_sdk folder at project, and include autload.php to use Communify SDK.

## 3. Examples

### 3.1. Single Sign On (S2O)
Use this code. Metas have to been rendered at  tag.

```php

    $accountId = '[ACCOUNT ID]';
    $data = array(
        'email'     		=> '[USER EMAIL]',
        'name'      		=> '[USER NAME]',
        'surname'   		=> '[USER SURNAME]',
        'file_url'          => '[USER PROFILE IMAGE URL]',
        'background_url'    => '[USER BACKGROUND IMAGE URL]',
        'language_id'       => '[LANG ID]'
    );
    echo \Communify\S2O\S2OClient::factory()->login($accountId, $data)->metas();

```

#### 3.1.1. Single Sign On (S2O) and Wordpress

```php

    function getAvatarUrl($id)
    {
        $avatar = get_avatar($id);
	    preg_match("/src=\"(.*?)\"/i", $avatar, $matches);
    	$url = $matches[1];
	    $urlArray = parse_url($url);
	    return 'http://'.$urlArray['host'].$urlArray['path'];
    }

    $currentUser = wp_get_current_user();
    $accountId = '[ACCOUNT ID]';
    if($currentUser->ID != 0)
    {
        $data = array(
            'email'     		=> $currentUser->user_email,
            'name'      		=> $currentUser->user_firstname,
            'surname'   		=> $currentUser->user_lastname,
            'file_url'          => getAvatarUrl($currentUser->ID)
        );
        echo \Communify\S2O\S2OClient::factory()->login($accountId, $data)->metas();
    }

```

### 3.2. Search Engine Optimization (SEO)

```php

    $accountId = '[ACCOUNT ID]';
    $data = array(
        'limit'             => '10',
        'order_by'          => 'date'
    );

    echo \Communify\SEO\SEOClient::factory()->widget($accountId, $data)->html();

```

### 3.3. Email After Purchase (EAP)
Considerations:
* All product lines have same user
* All product lines have same order_id
* Some product line fields are mandatories: orderId, price, productId, userEmail.

```php

    $accountId = '[ACCOUNT ID]';
    $productLine1 = array(
        'order_id'              => [ORDER ID],
        'price'                 => [PRICE],
        'product_id'            => [PRODUCT/TOPIC ID],
        'product_name'          => [PRODUCT/TOPIC NAME],
        'title'                 => [PRODUCT/TOPIC TITLE],
        'location_url'          => [PRODUCT/TOPIC URL]
        'title_to_display'      => [PRODUCT/TOPIC TITLE TO DISPLAY],
        'description'           => [PRODUCT/TOPIC DESCRIPTION],
        'site_image_url'        => [PRODUCT/TOPIC IMAGE URL],
        'category_slug'         => [CATEGORY SLUG],
        'category_name'         => [CATEGORY NAME],
        'category_description'  => [CATEGORY DESCRIPTION],
        'user_name'             => [CUSTOMER NAME],
        'user_surname'          => [CUSTOMER SURNAME],
        'user_email'            => [CUSTOMER EMAIL],
    );
    $order = array($productLine1, [$productLine2, ...]);

    \Communify\EAP\EAPClient::factory()->setOrder($accountId, $order);

```

```

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/bebf2eba16a2d8639c119cacf79b2e4188be69e595e1a49f7e976e80e331e2e2?d=identicon)[pitusabadi](/maintainers/pitusabadi)

---

Top Contributors

[![xevifuster](https://avatars.githubusercontent.com/u/4477076?v=4)](https://github.com/xevifuster "xevifuster (26 commits)")[![ricardmoya](https://avatars.githubusercontent.com/u/13135754?v=4)](https://github.com/ricardmoya "ricardmoya (19 commits)")[![jordibplease](https://avatars.githubusercontent.com/u/33060889?v=4)](https://github.com/jordibplease "jordibplease (18 commits)")[![AlexLopezHernandez](https://avatars.githubusercontent.com/u/1089458?v=4)](https://github.com/AlexLopezHernandez "AlexLopezHernandez (9 commits)")[![fabianbaena](https://avatars.githubusercontent.com/u/22449808?v=4)](https://github.com/fabianbaena "fabianbaena (7 commits)")[![francescArmengol](https://avatars.githubusercontent.com/u/4291428?v=4)](https://github.com/francescArmengol "francescArmengol (4 commits)")[![itsjorgemg](https://avatars.githubusercontent.com/u/44137164?v=4)](https://github.com/itsjorgemg "itsjorgemg (1 commits)")

### Embed Badge

![Health badge](/badges/communify-communify-php/health.svg)

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

###  Alternatives

[symfony/lock

Creates and manages locks, a mechanism to provide exclusive access to a shared resource

514127.6M459](/packages/symfony-lock)[spatie/macroable

A trait to dynamically add methods to a class

72659.6M64](/packages/spatie-macroable)[google/longrunning

Google LongRunning Client for PHP

5771.7M4](/packages/google-longrunning)[consolidation/filter-via-dot-access-data

This project uses dflydev/dot-access-data to provide simple output filtering for applications built with annotated-command / Robo.

4646.9M13](/packages/consolidation-filter-via-dot-access-data)[phootwork/lang

Missing PHP language constructs

1224.8M8](/packages/phootwork-lang)

PHPackages © 2026

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