latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Code To Add Signups To Email Autoresponder

Home Forums Community Forum Code To Add Signups To Email Autoresponder

This topic contains 2 replies, has 2 voices. Last updated by  Eduan 4 years ago.

Topic Author Topic
Posted: Saturday Dec 29th, 2012 at 1:20 pm #35722
Brad
Username: bradjbarton

A couple years ago, Jason created the following file for me, so that I could automatically add new site users to our email autoresponder:

<?php
/*
Posts data to WebWoms.
*/
if (( ($aid = stripslashes ($_GET["aid"])) || ($aid = "10")) && ($email = stripslashes ($_GET["email"])) && ($fname = stripslashes ($_GET["fname"])) && ($lname = stripslashes ($_GET["lname"])) && $_GET["s"] === "JIECSKSLWETEDK")
	webwoms_subscribe ($aid, $email, $fname, $lname);
/**/
function webwoms_subscribe ($aid, $email, $fname, $lname)
	{
		$url = "http://webwoms.net/ar/subc.php";
		/**/
		$vars["required"] = "lemail,lfname";
		$vars["filledfrm"] = "mysite.htm";
		/**/
		$vars["aid"] = $aid;
		$vars["lemail"] = $email;
		$vars["lfname"] = $fname;
		$vars["llname"] = $lname;
		/**/
		$vars["EMAILN"] = "Y";
		/**/
		curlpsr ($url, $vars);
	}
/*
Curl operation for posting data and reading response.
*/
function curlpsr ($url = FALSE, $postvars = FALSE, $max_con_secs = 20, $max_stream_secs = 20, $headers = FALSE)
	{
		if (($url = trim ($url)) && ($c = curl_init ()))
			{
				curl_setopt_array ($c, /* Configure options. */
				array (CURLOPT_URL => $url, CURLOPT_POST => true,/**/
				CURLOPT_FOLLOWLOCATION => false, CURLOPT_MAXREDIRS => 0,/**/
				CURLOPT_CONNECTTIMEOUT => (int)$max_con_secs, CURLOPT_TIMEOUT => (int)$max_stream_secs, /* Initial connection & stream seconds. */
				CURLOPT_HEADER => false, CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => (array)$headers, CURLOPT_POSTFIELDS => $postvars,/**/
				CURLOPT_ENCODING => "", CURLOPT_VERBOSE => true, CURLOPT_FAILONERROR => true, CURLOPT_FORBID_REUSE => true, CURLOPT_SSL_VERIFYPEER => false));
				/**/
				$o = trim (curl_exec ($c));
				/**/
				curl_close ($c);
			}
		/**/
		return (strlen ($o)) ? $o : false;
	}
?>

This file worked fine for that purpose. However, I would like to integrate this so as to add each different level signup to a different email autoresponder on our system. The aid value is the autoresponder number that the contact is added to. I would need to be able to change the aid number for each level. I currently have 9 levels, but only 8 are needed for this purpose because level 9 is the admin.

Can you please help me modify this code to achieve this purpose?

  • This topic was modified 4 years ago by  Brad. Reason: Didn't save code example
  • This topic was modified 4 years ago by  Brad.

List Of Topic Replies

Viewing 2 replies - 1 through 2 (of 2 total)
Author Replies
Author Replies
Posted: Tuesday Jan 1st, 2013 at 1:18 pm #35898
Brad
Username: bradjbarton

It is somewhat surprising that no one has posted a reply to my post after 3 days, not even to ask a question or clarify. In the meantime I have located the other piece of the puzzle. Jason added this line to the API / Notifications, Registration Notifications section:

http://www.mywebsite.com/webwoms.php?aid=%%cv2%%&email=%%user_email%%&fname=%%user_first_name%%&lname=%%user_last_name%%&s=JIECSKSLWETEDK

Note: mywebsite.com was used for this example. This is not the actual live URL.

So, even if I need 8 files (webwoms1.php, webwoms2.php, etc.) to change the aid value to match the autoresponder assigned to the level of the new registration and/or 8 input lines in the API / Notifications, Registration Notifications section, I still need to know how to make the new registration level number match an aid value (simply an autoresponder number on my system). This is basically all I need help with – how can I integrate the new registration level number to execute a specific file or how can I integrate the new registration level number to execute a modified php file that will determine the aid value based upon the new registration level number?

Can someone please help me with this?

  • This reply was modified 4 years ago by  Brad. Reason: Added question mark to the question
Posted: Tuesday Jan 1st, 2013 at 1:31 pm #35903
Eduan
Username: Eduan
Moderator

Hello Brad,

I’m afraid I can’t provide any help with this. Just wanted to say sorry. Cause even I that read every post for some reason didn’t get notified of this one.

I’m sure they just missed it, and with the Christmas and new year deal it just slipped. :)

– Eduan

Viewing 2 replies - 1 through 2 (of 2 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.