AWeber Subscription Using CURL

AWeber Email Marketing Software creates profitable customer relationships for your business. Its email marketing tools like professional email signup forms & auto-responder services make it easy for you to build your email list and stay in touch with prospects. Few features of this service are:
a. Manage Subscribers
b. Auto Responders
c. HTML Email Templates
d. Email Newsletters
e. RSS To Email

Following are some easy steps to integrate this service in your website:

Step 1: Add these codes in your web page where you want to display newsletter subscription form:

<form action=”” method=”post”>
<input type=”hidden” name=”meta_web_form_id” value=”[form_id]” />
<input type=”hidden” name=”meta_split_id” value=”” />
<input type=”hidden” name=”listname” value=”[list_name]” />
<input type=”hidden” name=”redirect” value=”[redirect_url]” />
<input type=”hidden” name=”meta_redirect_onlist” value=”[redirect_url_if_already_subscribed]” />
<input type=”hidden” name=”meta_adtracking” value=”[listing_name]_Form” />
<input type=”hidden” name=”meta_message” value=”1″ />
<input type=”hidden” name=”meta_required” value=”[name,email]” />
<input type=”hidden” name=”meta_tooltip” value=”” />
Name: <input type=”text” name=”aname” value=”” />
Email: <input type=”text” name=”aemail” value=”” />
<input type=”submit” name=”subscribe” value=”Subscribe” />
</form>

** You will get the above mentioned details from AWeber Customer Area after Login.

Step 2: Add the following PHP codes:

if(isset($_POST[‘subscribe’])){
$str=
‘meta_web_form_id=’.urlencode($_POST[‘meta_web_form_id’]).
‘&meta_split_id=’.urlencode($_POST[‘meta_split_id’]).
‘&meta_redirect_onlist=’.urlencode($_POST[‘meta_redirect_onlist’]).
‘&meta_required=’.urlencode($_POST[‘meta_required’]).
‘&meta_tooltip=’.urlencode($_POST[‘meta_tooltip’]).
‘&listname=’.urlencode($_POST[‘listname’]).
‘&redirect=’.urlencode($_POST[‘redirect’]).
‘&meta_adtracking=’.urlencode($_POST[‘meta_adtracking’]).
‘&meta_message=’.urlencode($_POST[‘meta_message’]).
‘&name=’.urlencode($_POST[‘aname’]).
‘&email=’.urlencode($_POST[‘aemail’])
;
$url = ‘http://www.aweber.com/scripts/addlead.pl&#8217;;

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HEADER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER,array(‘Expect:’));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_NOBODY, FALSE);
curl_setopt($ch, CURLOPT_POSTFIELDS, $str);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
curl_setopt($ch, CURLOPT_MAXREDIRS, 10);
$response = curl_exec($ch);
curl_close($ch);
}

Step 3: Test the system.

Users subscribing via the above form will automatically get added in your AWeber mailing list.

Source:pushpalmazumder

//

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.