Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1551
  • Last Modified:

Using Constant Contact API


I have a registration form on a site that populates info into my database.  

Now, I would like to use the Constant Contact API to add my users to my email list, in addition to registering them with my site. .

I do not quite understand how to do this because I have seen some posts talking about writing a .com component also.

So, Constant contact with allow a get or post to their api URL: http://ccprod.roving.com/roving/wdk/API_AddSiteVisitor.jsp
Here is an example with a get although I think I would like to use post.

Can someone point me in the rirght direction? How can I do 2 posts with one form.
  • 2
1 Solution
here is a quick example on how to post using a technique called remote scripting.  youwould build your form key/value pairs then send it to the url above.

<%@ Language=vbScript%>
 DataToSend = "id=1"
 dim xmlhttp
     set xmlhttp = server.Createobject("MSXML2.ServerXMLHTTP")
 xmlhttp.Open "POST","http://server/test.asp",false
 xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
 xmlhttp.send DataToSend
 Set xmlhttp = nothing
baybookAuthor Commented:

Thanks for pointing me in a direction.  What does the datatosend do?  I'm guessing I can put what would have been a "querystring" if I can using the post method.  I will play around with it.

the datatosend variable is getting a value set to it above.

DataToSend = "id=1"

you would construct this just like a querystring would look with & signs delimiting.

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now