Skip to content

Instantly share code, notes, and snippets.

@jonesch
jonesch / exact-target-curl
Created October 5, 2012 18:54
Submitting to Exact Target with cURL
<?php //I am using this for an AJAX call, and checking my responses against the success or failure that it is echoing back.
//create array of data to be posted
$full_name = stripslashes(trim(strip_tags($_POST['full_name'])));
$email_address = stripslashes(trim(strip_tags($_POST['email_address'])));
if(!empty($full_name) && !empty($email_address)){
$post_data['MID'] = "10488043";
$post_data['Full Name'] = $full_name;
$post_data['Email Address'] = $email_address;
$post_data['thx'] = '';