ColdFusion - Sample code to add/update a subscriber
ColdFusion Sample Code
<!--- sample ColdFusion code to add a subscriber ---> <cfset l_username = "USERNAME"> <cfset l_password = "PASSWORD"> <cfset l_listid = 1234567> <cfset l_email = "test@criticalimpact.com"> <cfset l_firstname = "Firstname"> <cfset l_lastname = "Lastname"> <cfset url1 = 'http://clients.criticalimpact.com/api/api.cfm?ci=<?xml version="1.0"?> <criticalimpact> <login> <username>#l_username#</username> <password>#l_password#</password> </login> <command> <action>subscriberadd</action> <listid>#l_listid#</listid> <email><![CDATA[#l_email#]]></email> <firstname><![CDATA[#l_firstname#]]></firstname> <lastname><![CDATA[#l_lastname#]]></lastname> <unsubscribe>0</unsubscribe> <listunsubscribe>0</listunsubscribe> <custom1>Sample Value</custom1> <custom2>Sample Value</custom2> <custom3>Sample Value</custom3> <custom4>Sample Value</custom4> </command> </criticalimpact>'> <!--- display the URL we call ---> <textarea rows="10" cols="80"> <cfoutput>#url1#</cfoutput> </textarea><br /><BR /> <cfhttp url="#url1#" method="GET" redirect="yes" resolveurl="Yes" throwOnError="Yes" /> <cfdump var="#cfhttp.filecontent#">