A handy autoresponder plus plugin modification

Discussion in 'Integration' started by tmhcom, Apr 25, 2006.

  1. tmhcom

    tmhcom New Member

    Joined:
    Oct 5, 2003
    Messages:
    10
    I just thought I would let you know that since version 3.3.001 of arp3, they added the ability to pass the ip address of the subscriber through remote control requests.

    So if you are using the autoresponder plus plugin to add your amember members to an arp3 autoresponder then you can add -

    +ip=$member[remote_addr]

    to the appropriate functions in the 'arp.inc.php' file

    So the function 'arp_added' will look something like this -
    (The modification is in RED

    ***Begin Function arp_added**

    function arp_added($member_id, $product_id,
    $member){
    global $db, $config;
    $product = $db->get_product($product_id);
    if (!$product['arp_subscription']) return;
    $this_config = $config['protect']['arp'];
    mail_customer($this_config['email'], "***",
    $x="owner=$this_config[owner_name]+password=$this_config[owner_pass]".
    "+action=subscribe+name=$member[name_f]_$member[name_l]+email=$member".
    "+autoresponder=$product[arp_subscription]+plain+TRA$member[login][COLOR="Red"]+ip=$member[remote_addr][/COLOR]"

    );

    ***End Function 'arp_added'***

    and the function 'arp_deleted' will look something like this -

    ***Begin Function 'arp_deleted'***

    function arp_deleted($member_id, $product_id,
    $member){
    global $db, $config;
    $product = $db->get_product($product_id);
    if (!$product['arp_subscription']) return;
    $this_config = $config['protect']['arp'];
    mail_customer($this_config['email'], "***",
    $x="owner=$this_config[owner_name]+password=$this_config[owner_pass]".
    "+action=unsubscribe+name=$member[name_f]_$member[name_l]+email=$member[email]".
    "+autoresponder=$product[arp_subscription]+plain+TRA$member[login][COLOR="Red"]+ip=$member[remote_addr][/COLOR]"
    );
    ***End Function 'arp_deleted'***

    As usual, make sure you have a backup copy of arp.inc.php before you make the modifications.

    Hope this helps somebody

    Thanks

    Terry

Share This Page