2017 © Pedro Peláez
 

library ivanhoe-sdk

PHP sdk for replacing affiliate links

image

ivanhoe/ivanhoe-sdk

PHP sdk for replacing affiliate links

  • Monday, September 12, 2016
  • by Jeloo
  • Repository
  • 1 Watchers
  • 0 Stars
  • 11 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Ivanhoe-php-SDK

##Installation

``` sh $ composer require ivanhoe/ivanhoe-sdk, (*1)


## Basic Usage ### Create a user session and get sub id ----------- ``` php $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., (*2)

Able parameters are:

hostname - Your website hostname with a protocol., (*3)

user_agent - Valid user agent., (*4)

user_ip - Valid ipv4 or ipv6., (*5)

referrer - The traffic source., (*6)

document_path., (*7)

language - Two characters that means a user language., (*8)

google_client_id - Google analytics client id from [_ga] cookie. Can be get within a helper Analitycs, (*9)

Example:, (*10)


``` php $httpClient = new \Ivanhoe\SDK\CurlClient(); $sessionResource = new Ivanhoe\SDK\SessionResource($httpClient);, (*11)

$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(), ]);, (*12)


### Setting options You are able to set curl options on CurlClient::setOpts method. The keys are curl option constants. ----------- ``` php $httpClient = new \Ivanhoe\SDK\CurlClient(); $httpClient->setOpts([ CURLOPT_FRESH_CONNECT => true ]);

The Versions

12/09 2016

dev-master

9999999-dev

PHP sdk for replacing affiliate links

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Avatar Jeloo

12/09 2016

1.2

1.2.0.0

PHP sdk for replacing affiliate links

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Avatar Jeloo

12/09 2016

dev-gaProfileFix

dev-gaProfileFix

PHP sdk for replacing affiliate links

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Avatar Jeloo

12/08 2016

1.1

1.1.0.0

PHP sdk for replacing affiliate links

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Avatar Jeloo