Adding an email address to a client's Constant Contact account
Posted on Monday, June 08th (3570 days ago)
I work with alot of Realtors. For some this might seem scary. I take it in stride. I was a Realtor once. I guess I still am technically though I haven’t practiced in quite a few years. At any rate, sometimes these Realtors use Constant Contact for their email marketing and it’s a good system. If I have to add an email address to their account when someone fills in a contact form etc on their website, here’s the code I use:
This example uses PHP and it’s wondeful cURL library to silently insert an email address into the client’s mailing list.
$url = 'http://visitor.constantcontact.com/d.jsp'; $post_values = 'm=c=0123456789&p=oi&ea=' . $email; $ch = curl_init($url); curl_setopt ($ch, CURLOPT_POST, 1); curl_setopt ($ch, CURLOPT_POSTFIELDS, $post_values); $html = curl_exec ($ch); //echo $html; curl_close ($ch);
Pretty simple indeed!
About Joseph R. B. Taylor
Joseph R. B. Taylor is a designer/developer who makes stuff for screens of all shapes and sizes. He currently works at Edvisors, Inc. where he creates screen-based experiences for used by millions of college students every year.