A couple years ago, Jason created the following file for me, so that I could automatically add new site users to our email autoresponder:
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));
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.