'Define these variables.
Dim apikey
Dim listid
Dim MCURL = "http://api.mailchimp.com/1.2/"
Function listSubscribe (strEmail, strFirstName, strLastName, strPhone)
Dim resp
Dim merge_vars
Dim ParamArr
Set merge_vars = Server.CreateObject("Scripting.Dictionary")
With merge_vars
.Add "OPTINIP", Request.ServerVariables("REMOTE_ADDR")
.Add "double_optin", False
.Add "FNAME", strFirstName
.Add "LNAME", strLastName
.Add "phone", strPhone
End With
'Function Reference: listSubscribe(string apikey, string id, string email_address, array merge_vars, string email_type, boolean double_optin, boolean update_existing, boolean replace_interests, boolean send_welcome)
'NOTE THAT EMPTY VALUES DO NOT WORK WELL WITH THIS VERSION OF XLMRPC.ASP. BEST TO SEND EMPTY STRINGS.
ParamArr = array(apikey,listid,strEmail,merge_vars,"",True,True,True,True)
resp = xmlRPC(MCURL,"listSubscribe",ParamArr)
'Uncomment below for Error Checking
'Response.Write(Session("xmltxt")&"
")
'Response.Write(Session("ServerResponseText")&"
")
LGNListSubscribe = resp
End Function