iContact cURL sub code


/ Published in: PHP
Save to your folder(s)

correct code for subbing someone to icontact through curl


Copy this code and paste it in your HTML
  1. <?
  2.  
  3. $email = "[email protected]";
  4. $first_name = "batman";
  5. $last_name = "batman";
  6. $phone = "343434343343";
  7. //http://app4.intellicontact.com/icp/signup.pl?listid=41249&specialid:41249=CHVM&reallistid=1&[email protected]&fields_fname=addy&fields_lname=3232
  8.  
  9.  
  10.  
  11.  
  12. $sendic = array('fields_email'=>$email,
  13. 'fields_fname'=>$first_name,
  14. 'fields_lname'=>$last_name,
  15. 'fields_phone'=>$phone,
  16. 'fields_address1'=>$address,
  17. 'fields_city'=>$city,
  18. 'fields_state'=> $state,
  19. 'fields_zip'=>$zip,
  20. 'fields_custom1'=>$custom1,
  21. 'fields_custom2'=>$custom2,
  22. 'listid'=>'43413',
  23. 'specialid:43413'=>'NMOT',
  24. 'clientid'=>'238661',
  25. 'realistid'=>'1',
  26. 'doubleopt'=>'0',
  27. 'redirect'=>'none',
  28. 'errorredirect'=>'none');
  29. $url = 'http://app.intellicontact.com/icp/signup.php';
  30. $ch = curl_init();
  31. curl_setopt($ch, CURLOPT_URL, $url);
  32. curl_setopt($ch, CURLOPT_POST, 1);
  33. curl_setopt($ch, CURLOPT_POSTFIELDS, $sendic);
  34. $result = curl_exec($ch);
  35. echo $result;
  36.  
  37. ?>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.