سؤال

I am trying to find a simple bare bones example/demo that shows me how I can build a trivial/proof of concept website that will collect user email (and maybe first name), and add this name to a list created on mailchimp.

To clarify, I am not merely asking how to create a PHP/mySQl website - I already know how to do that, and I already know how to place a form on a page etc.

Assuming I already have the following: - A php/MySQL site with a registration form - A newly created list on mailchimp

More specifically, I want a user to be able to register on a page on my site, and then I want the following sequence of events to happen:

  1. When a user clicks the 'submit' button on my page, their details gets sent to mailchimp and added to a specific list created on mailchimp
  2. They are sent a confirmation email by mailchimp
  3. Once they confirm subscription, they are directed back to a page on my site, with a token from mailchimp
  4. I store their details (provided by mailchimp) into my MySQL database
  5. I send the confirmed subscriber an email with an attachment
  6. When the user unsubscribes from the list, I get notified by mailchimp and I can flag the user as unsubscribed in my database.

I have not been able to find a simple demo (or tutorial) that shows how to implement the required functionality listed above. Can anyone recommend a link (or links) to get me started with implementing these specific "bare bone" functionality?

هل كانت مفيدة؟

المحلول

The documentation is rather good I thought?

Just checkout the API-docs: http://apidocs.mailchimp.com/api/how-to/basic-subscribe.php

And if for some reason you do not want to read docs but just want to see code (please, don't do this, but hey, what do I know): click on the exmples listed here: http://apidocs.mailchimp.com/api/downloads/#examples

Start with the example code and if it doesn't do exactly everything, you can find it at the docs easily enough.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top