Community Support Forums — WordPress® ( Users Helping Users ) — 2010-10-29T02:43:06-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=1075 2010-10-29T02:43:06-05:00 http://www.primothemes.com/forums/viewtopic.php?t=1075&p=4384#p4384 <![CDATA[Re: API Scripting Question]]> Glad I could help.

Statistics: Posted by Jason Caldwell — October 29th, 2010, 2:43 am


]]>
2010-10-28T10:46:03-05:00 http://www.primothemes.com/forums/viewtopic.php?t=1075&p=4360#p4360 <![CDATA[Re: API Scripting Question]]>
I think that is exactly what I was looking for!

Kirk

Statistics: Posted by KirkWard — October 28th, 2010, 10:46 am


]]>
2010-10-27T23:21:02-05:00 http://www.primothemes.com/forums/viewtopic.php?t=1075&p=4348#p4348 <![CDATA[Re: API Scripting Question]]> s2Member -> API Notifications.

However, your URL should look something like this:
Code:
http://www.example.com/some-script.php?email=%%payer_email%%&item=%%item_name%%&item_number=%%item_number%%
You will find a more complete documentation on these Replacement Codes in your Dashboard, under: s2Member -> API Notifications.

----------------- some-script.php --------------------
As referenced in the URL above, would be a script that you write, which responds in some way to the Notification event processed by s2Member.

Statistics: Posted by Jason Caldwell — October 27th, 2010, 11:21 pm


]]>
2010-10-26T11:16:45-05:00 http://www.primothemes.com/forums/viewtopic.php?t=1075&p=4245#p4245 <![CDATA[Re: API Scripting Question]]>
I use a self hosted autoresponder called "AutoResponsePlus." It has worked well for many years and I have a bit more control over user registration than if I used a service. I want to simultaneously sign up my members as subscribers when they register, and terminate them when they reach EOT.

I can subscribe and unsubscribe them by email, using the ARP remote serive. I merely have to format the email correctly, including a username and password. ARP uses the "to" part of the address as the name of the autoresponder campaign, and the "from" part of the address as the name to add to the list.

In my other system (using a different membership script), I name my campaigns to match the item name as sent to PayPal. I would like to do the same here, which means I need to pass the item name and the users email address to the script.

That is why I structured the email including those two items. I can write the mail() function into a short script, if I can get the itemname and useremail variables there as parameters in the url. To wit ...

Code:
http://mydomain.com?email=%%email%%&item=%%itemname%%


So, do I need to include the question mark and the ampersands when formatting the URL in the api scripting?

Statistics: Posted by KirkWard — October 26th, 2010, 11:16 am


]]>
2010-10-26T02:51:58-05:00 http://www.primothemes.com/forums/viewtopic.php?t=1075&p=4229#p4229 <![CDATA[Re: API Scripting Question]]> s2Member -> API List Servers in your Dashboard.

However, here is a sample PHP routine that may give you some ideas.
Code:
foreach (get_users_of_blog () as $user)
    {
        $user = new WP_User ($user->ID);
        #print_r($user); /* to get a full list of $user-> variables when debugging. */
        mail ($user->user_email, "Subject", "Body", "From: you@yoursite.com\r\nContent-Type: text/plain; charset=utf-8");
    } 

Statistics: Posted by Jason Caldwell — October 26th, 2010, 2:51 am


]]>
2010-10-25T07:02:31-05:00 http://www.primothemes.com/forums/viewtopic.php?t=1075&p=4165#p4165 <![CDATA[Re: API Scripting Question]]> Statistics: Posted by webboy — October 25th, 2010, 7:02 am


]]>
2010-10-24T23:49:08-05:00 http://www.primothemes.com/forums/viewtopic.php?t=1075&p=4162#p4162 <![CDATA[API Scripting Question]]>
I want to do something like ...
Code:
<?php
mail( "%%role%%@somewhere.com", "subject", "message", "From: %%user_email%%" )
?>

... as a way to do an email subscription to a list based on the s2 member level. Or, possibly, the item number.

Or, do I have to send the variables to a script containing that code?

Statistics: Posted by KirkWard — October 24th, 2010, 11:49 pm


]]>