public static integer listAddContactsForm(string token, string signupFormID, array contacts)
dd the contact details to the given contact list using an existing signup form.
Contact List Related Methods

string tokenA valid token for your account. To generate a token, use the login method.
string signupFormIDThe ID of the signup form you want to use. To get all the signup forms, use the listGetSignupForms method.
array contactsThe array containing the contact details.
string emailThe email address
string firstnameThe First Name of the contact
string lastnameThe Last Name of the contact

integerReturns the total number of contacts which were successfully added.

download example code

  1. <?php
  2. /**
  3. This Example shows how to authenticate a user using XML-RPC.
  4. Note that we are using the PEAR XML-RPC client and recommend others do as well.
  5. **/
  6. require_once 'XML/RPC2/Client.php';
  7. require_once 'inc/config.php';
  8. $client = XML_RPC2_Client::create($apiURL);
  9. $token = $client->login($apiLogin, $apiPassword);
  11. /**
  12. Fetch the latest signup form, so we can retrieve the signup form ID.
  13. **/
  14. $formList = $client->listGetSignupForms($token, 1, 1, "");
  15. $formID = $formList[0]['id'];
  16. Prepare the data to insert.
  17. **/
  18. $record1['email'] = "";
  19. $record1['firstname'] = 'Peter';
  20. $record1['lastname'] = 'Parker';
  21. $added = $client->listAddContactsForm($token, $formID, $record1);
  23. echo $added . " records added.";
  24. ?>