function httpAddContactToGetresponse($email,$name,$campaignId)
{
$url = "https://api.getresponse.com/v3/contacts";
$ch = curl_init();
$vars=array("email"=>$email,"name"=>$name,
"campaign[campaignId]"=>$campaignId,"dayOfCycle"=>"0"
);
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,$vars); //Post Fields
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$headers = [
'X-Auth-Token: api-key xxxxxxxxxxxxxxxxxxxxxxx'
];
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$server_output = curl_exec ($ch);
//error_log( print_r( $server_output, true ) );
curl_close ($ch);
return $server_output;
}
-
Notifications
You must be signed in to change notification settings - Fork 0
amankkamboj/Getresponse-Api3-php
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Getresponse api using php
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published