Skip to content

Instantly share code, notes, and snippets.

View LachlanArthur's full-sized avatar
🐊

Lachlan Arthur LachlanArthur

🐊
View GitHub Profile
<?php
declare(strict_types=1);
namespace loophp\ComposerStripNondeterminism\Service;
use FilesystemIterator;
use loophp\ComposerStripNondeterminism\Iterator\SortedIterator;
use RecursiveDirectoryIterator;
use RecursiveIteratorIterator;
@manosriglis
manosriglis / cm_copy_list.php
Last active February 18, 2016 09:11
Duplicate campaign monitor lists with custom field definitions
<?php
require_once 'vendor/campaignmonitor/createsend-php/csrest_lists.php';
$sourceList = new CS_REST_Lists('LIST_ID', array('api_key' => 'API_KEY'));
$targetList = new CS_REST_Lists('LIST_ID', array('api_key' => 'API_KEY'));
$result = $sourceList->get_custom_fields();
foreach($result->response as $field){