$api = new GetResponse('YOUR_API_KEY');
// Connection Testing
$ping = $api->ping();
var_dump($ping);
// Account
$details = $api->getAccountInfo();
var_dump($details);
// Campaigns
$campaigns = (array) $api->getCampaigns();
$campaignIDs = array_keys($campaigns);
$campaign = $api->getCampaignByID($campaignIDs[0]);
var_dump($campaigns, $campaign);
// Contacts
$contacts = (array) $api->getContacts(null);
$contactIDs = array_keys($contacts);
$setName = $api->setContactName($contactIDs[0], 'John Smith');
$setCustoms = $api->setContactCustoms($contactIDs[0], array('title' => 'Mr', 'middle_name' => 'Fred'));
$customs = $api->getContactCustoms($contactIDs[0]);
$contact = $api->getContactByID($contactIDs[0]);
$geoIP = $api->getContactGeoIP($contactIDs[0]);
$opens = $api->getContactOpens($contactIDs[0]);
$clicks = $api->getContactClicks($contactIDs[0]);
// Find the contact ID by using email ID and delete the contact
$contactEmail = (array) $api->getContactsByEmail('EMAIL_ID');
$contactEmailID = array_keys($contactEmail);
$deleteResponse = $api->deleteContact($contactEmailID[0]);
var_dump($contacts, $setName, $setCustoms, $customs, $contact, $geoIP, $opens, $clicks);
// Blacklists
$addBlacklist = $api->addAccountBlacklist('*****@*****.**');
$getBlacklist = $api->getAccountBlacklist();
$delBlacklist = $api->deleteAccountBlacklist('*****@*****.**');
 if ($list_v['updateexistingcontact']) {
     /*
     $gr_search_res:							
     stdClass Object
     (
     	[xyz] => stdClass Object
     		(
     			[email] => x@x.com
     		)
     
     )
     contact id is $gr_search_res->xyz: the only way to get the contact id is using an array
     */
     $gr_contact_res = (array) $gr_search_res;
     $gr_contact_id = key($gr_contact_res);
     $gr_update_name = $getresponse_api->setContactName($gr_contact_id, $getresponse_contact['name']);
     /*
     http://apidocs.getresponse.com/en/api/1.5.0/Contacts/set_contact_name
     success: ->updated = 1
     */
     if ($contactform_obj->cfg['debug']) {
         echo 'UPDATE CONTACT ' . "\r\n";
         echo 'gr_update_name';
         echo "\r\n";
         print_r($gr_update_name);
         echo "\r\n";
     }
     if (!$gr_update_name) {
         $admin_api_error[$service_id]['error_message'] = 'Update contact name, unknown error.';
     }
     if ($gr_update_name) {