# mailchimp/1.4.3/lib/sopresto/test.php

Mailchimp List Subscribe Form, version 1.4.3. 21 lines.

- Page: https://pluginprobe.com/plugins/mailchimp/1.4.3/code/lib/sopresto/test.php
- Raw: https://pluginprobe.com/plugins/mailchimp/1.4.3/raw/lib/sopresto/test.php
- Modified: 2016-01-29T18:49:32+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/mailchimp/1.4.3/code/lib/sopresto/test.php#L10-L20`.

```php
<?php
require('sopresto.php');
$public = 'XXX';
$secret = 'YYY';
$version = '1.3'; // or '2.0'

$sopresto = new Sopresto_MailChimp($public, $secret, $version);

if ( $version == '2.0' )  {
    // First underscore will be changed for a slash. 
    // Remaning underscores will be changed by a dash
    // Ie.- to call 'helper/search-members' you should use $sopresto->helper_search_members()

    $response = $sopresto->campaigns_list(array(), 0, 2);
} else {
    $response = $sopresto->campaigns(array(), 0, 2);
}

print_r($response);


```
