Affily SDK for PHP

Affily SDK for PHP provides a feature set that allow access to The Affily platform server-side.

You can download Affily SDK for PHP by clicking here.

To start with, you need to create an application profile, to which you will obtain an ID and a secret code. The data will be needed for authorization of methods used within the API. The application that will connect to the The Affily platform may be created in the admin panel (Configuration » SDK for PHP).

Installation

To install the SDK package, you need to unpack the downloaded files and copy them to the directory on the server, e.g.: php-sdk. Then you just need to append the SDK to the file in which we want to use it php-sdk/affily.php. We start a new object Affily with two parameters in the id array (ID) and secret (secret code). The parameters will be collected from the details of the application that was created before.

PHP
    require_once("php-sdk/affily.php");

    
$config = array(
        
'id' => ''# ID App
        
'secret' => '' # Secret Code
    
);

    
$affily = new Affily($config);