Hello: I'm trying to send parameters from amember (first name and email) to third party API (autoresponder system) but send empty data, could you please help? I adedd this code to the file: site.inc.php PHP: function subscriberSubscribe() { $post_parameters = array(); $post_parameters[] = "Command=Subscriber.Subscribe"; $post_parameters[] = "ResponseFormat=JSON"; $post_parameters[] = "ListID=702"; $post_parameters[] = "EmailAddress={$member['email']}"; $post_parameters[] = "IPAddress={$_SERVER['REMOTE_ADDR']}"; $post_parameters[] = "CustomField1={$member['name_f']}"; $response = postData("http://www.website.com/api.php?", $post_parameters); if (empty($response[0])) { return false; } else { return json_decode($response[1]); } } setup_plugin_hook("subscription_added", "subscriberSubscribe"); Thanks in Advance Kind Regards Jose
Hello: Resolved.... I change to: PHP: function subscriberSubscribe($member_id, $product_id,$member) { $customeremail = strtolower( $member['email'] ); $customername_f = ucfirst(strtolower( $member['name_f'] )); $post_parameters = array(); $post_parameters[] = "Command=Subscriber.Subscribe"; $post_parameters[] = "ResponseFormat=JSON"; $post_parameters[] = "ListID=702"; $post_parameters[] = "EmailAddress=".$customeremail; $post_parameters[] = "IPAddress={$_SERVER['REMOTE_ADDR']}"; $post_parameters[] = "CustomField1=".$customername_f; $response = postData("http://www.website.com/api.php?", $post_parameters); if (empty($response[0])) { return false; } else { return json_decode($response[1]); } }setup_plugin_hook("subscription_added", "subscriberSubscribe"); Thanks