PHPackages                             ivanhoe/ivanhoe-sdk - 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. ivanhoe/ivanhoe-sdk

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

ivanhoe/ivanhoe-sdk
===================

PHP sdk for replacing affiliate links

1.2(9y ago)022MITPHPPHP &gt;=5.3.0

Since Aug 12Pushed 9y ago1 watchersCompare

[ Source](https://github.com/Jeloo/Ivanhoe-php-SDK)[ Packagist](https://packagist.org/packages/ivanhoe/ivanhoe-sdk)[ RSS](/packages/ivanhoe-ivanhoe-sdk/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (2)DependenciesVersions (4)Used By (0)

Ivanhoe-php-SDK
===============

[](#ivanhoe-php-sdk)

\##Installation
---------------

[](#installation)

```
$ composer require ivanhoe/ivanhoe-sdk
```

Basic Usage
-----------

[](#basic-usage)

### Create a user session and get sub id

[](#create-a-user-session-and-get-sub-id)

---

```
$httpClient = new \Ivanhoe\SDK\CurlClient();
$sessionResource = new Ivanhoe\SDK\SessionResource($httpClient);

$subId = $sessionResource->setCredentials(['id', 'password'])
    ->getSubId();
```

This method will send user data to Ivanhoe server and return a generated sub id. But you can pass custom body parameters to SessionResource::getSubId to override user info. Able parameters are:
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

[](#this-method-will-send-user-data-to-ivanhoe-server-and-return-a-generated-sub-idbut-you-can-pass-custom-body-parameters-to-sessionresourcegetsubid-to-override-user-infoable-parameters-are)

`hostname` - Your website hostname with a protocol.

`user_agent` - Valid user agent.

`user_ip` - Valid ipv4 or ipv6.

`referrer` - The traffic source.

`document_path`.

`language` - Two characters that means a user language.

`google_client_id` - Google analytics client id from \[\_ga\] cookie. Can be get within a helper Analitycs

Example:

---

```
$httpClient = new \Ivanhoe\SDK\CurlClient();
$sessionResource = new Ivanhoe\SDK\SessionResource($httpClient);

$subId = $sessionResource->setCredentials(['id', 'password'])
    ->getSubId([
        'hostname'   => 'http://test.com',
        // google analytics profile id
        // https://developers.google.com/analytics/devguides/collection/analyticsjs/cookies-user-id
        'google_client_id' => Ivanhoe\SDK\Analytics::getProfileId(),
    ]);
```

### Setting options

[](#setting-options)

You are able to set curl options on CurlClient::setOpts method. The keys are curl option constants.

---

```
$httpClient = new \Ivanhoe\SDK\CurlClient();
$httpClient->setOpts([
    CURLOPT_FRESH_CONNECT => true
]);
```

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

Established project with proven stability

 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 ~31 days

Total

2

Last Release

3578d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5669640?v=4)[Ivan Yaroslavtsev](/maintainers/Jeloo)[@Jeloo](https://github.com/Jeloo)

---

Top Contributors

[![Jeloo](https://avatars.githubusercontent.com/u/5669640?v=4)](https://github.com/Jeloo "Jeloo (20 commits)")

### Embed Badge

![Health badge](/badges/ivanhoe-ivanhoe-sdk/health.svg)

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

PHPackages © 2026

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