Guest User

PHP mailchimp parameters problem

a guest
Apr 11th, 2014
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.68 KB | None | 0 0
  1. // this is inside my subscriber_post_php_file:
  2. $subscriber_geral = $Mailchimp_Lists->subscribe($list_id_geral, array( 'email' => $email), array('new-email' => $email, 'groupings' => null, 'optin_ip' => $ip, 'optin_time' => date('Y-m-d H:i:s',strtotime("now")), array('latitude' => null,'longitude' => null,'anything' => $ip), null, null), html, false, true, true, false  );
  3.  
  4. // this is the subscribe function:
  5.     public function subscribe($id, $email, $merge_vars=null, $email_type='html', $double_optin=true, $update_existing=false, $replace_interests=true, $send_welcome=false) {
  6.         $_params = array("id" => $id, "email" => $email, "merge_vars" => $merge_vars, "email_type" => $email_type, "double_optin" => $double_optin, "update_existing" => $update_existing, "replace_interests" => $replace_interests, "send_welcome" => $send_welcome);
  7.  
  8. print "<br><br>_params: ";
  9. print_r($_params);
  10. print "<br><br>merge_vars: ";
  11. print_r($merge_vars);
  12.         return $this->master->call('lists/subscribe', $_params);
  13.     }
  14.  
  15. // this is the print_r results:
  16. _params: Array ( [id] => 4asfdsf147 [email] => Array ( [email] => contato@fsdfsfdf.com ) [merge_vars] => Array ( [new-email] => contato@fdfdsfdsf.com [groupings] => [optin_ip] => 200.64.36.221 [optin_time] => 2014-04-11 09:36:30 [0] => Array ( [latitude] => [longitude] => [anything] => 200.64.36.221 ) [1] => [2] => ) [email_type] => html [double_optin] => [update_existing] => 1 [replace_interests] => 1 [send_welcome] => )
  17.  
  18. merge_vars: Array ( [new-email] => contato@ffdsfdsfds.com [groupings] => [optin_ip] => 200.64.36.221 [optin_time] => 2014-04-11 09:36:30 [0] => Array ( [latitude] => [longitude] => [anything] => 200.64.36.221 ) [1] => [2] => )
Add Comment
Please, Sign In to add comment