2017 © Pedro Peláez
 

library silverpopphp

Silverpop API in php

image

ckdarby/silverpopphp

Silverpop API in php

  • Friday, May 23, 2014
  • by ckdarby
  • Repository
  • 1 Watchers
  • 1 Stars
  • 2,956 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 51 Forks
  • 0 Open issues
  • 1 Versions
  • 5 % Grown

The README.md

Silverpop PHP Client Library

PHP client library for the Silverpop API, (*1)

Installation

Installation via composer . Create a composer.json file in the root folder of you project and paste the code below., (*2)

{
    "require": {
        "ckdarby/silverpopphp": "master-dev"
    }
}

With composer installed, just run php composer.phar install or simply composer install if you did a global install., (*3)

Usage

<?php

// Include the library
require_once 'vendor/autoload.php';

// Require the Silverpop Namespace
use Silverpop\EngagePod;

// Set some useful variables
$databaseID   = 'XXX';
$templateID   = 'XXX';
$contactsList = 'XXX';

// Initialize the library
$silverpop = new EngagePod(array(
  'username'       => 'XXX',
  'password'       => 'XXX',
  'engage_server'  => 4,
));

// Fetch all contact lists
$lists = $silverpop->GetLists(18);
var_dump($lists);

// Add a record to a contact
$recipientID = $silverpop->addContact(
  $databaseID,
  true,
  array(
    'name'  => 'christos',
    'email' => 'chris@simpleweb.co.uk',
  )
);
echo $recipientID;

// Create a new mailing and send in 1 minute
$mailingID = $silverpop->sendEmail(
  $templateID,
  $databaseID,
  'API Mailing Test - ' . date("d/m/Y H:i:s", time()),
  time() + 60,
);
echo $mailingID;

The Versions

23/05 2014

dev-master

9999999-dev https://github.com/ckdarby/SilverpopPHP

Silverpop API in php

  Sources   Download

GPL

The Requires

  • php >=5.3.0
  • ext-curl *

 

api email silverpop xml-api