PHP code example of getresponse / sdk-php

1. Go to this page and download the library: Download getresponse/sdk-php library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

getresponse / sdk-php example snippets




use Getresponse\Sdk\GetresponseClientFactory;

$client = GetresponseClientFactory::createWithApiKey('my_api_key');




use Getresponse\Sdk\GetresponseClientFactory;

$client = GetresponseClientFactory::createEnterprisePLWithApiKey('my_api_key', 'myexampledomain.com');




use Getresponse\Sdk\GetresponseClientFactory;

$client = GetresponseClientFactory::createEnterpriseUSWithApiKey('my_api_key', 'myexampledomain.com');




use Getresponse\Sdk\Operation\Campaigns\GetCampaigns\GetCampaigns; 

$campaignsOperation = new GetCampaigns();
$response = $client->call($campaignsOperation);




$operationsArray = array($operation1, $operation2, $operation3);
$responsesCollection = $client->callMany($operationsArray);




$response = $client->call($campaignsOperation);




$response->isSuccess();




$response->getResponse()->getStatusCode();




$response->getData();




$response->getResponse()->getBody()->getContents();




$response->getResponse()->getBody()->getSize();




$response->isPaginated();

$response->getPaginationValues();


composer 


git clone https://github.com/GetResponse/sdk-php.git