Get answers quicker by searching

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

Capture IP Address/Date Joined on Signup?
  • Vote Up0Vote Down OrangeOrange
    Posts: 6Sendy user

    Can anyone provide some sample code that would allow me to capture the subscriber's IP address and the date they joined the list? I realize I can add them as custom fields (and did for my imported lists) but need to know how to capture them from an autoresponder.

    My previous autoresponder did this and I found it invaluable for dealing with order errors, spam complaints and just general tracking. Additionally, should SES cease to work out in the long run just about any provider is going to want this data, especially the join IP before they allow a large data import. I'd much rather have it.

    Any help on this?

  • 3 Comments
  • Vote Up0Vote Down BenBen
    Posts: 3,489Sendy support

    Hi @Orange,

    You can use store IP addresses in custom fields.

    Here's the function to get a user's IP address in PHP - http://stackoverflow.com/questions/6794782/definitive-way-to-get-user-ip-address-php

    Best regards,
    Ben

  • Vote Up0Vote Down OrangeOrange
    Posts: 6Sendy user

    Thanks, Ben. You'll have to forgive me as I am a total PHP novice. For example, if I were to use the following as part of my subscription form:

    <input type="hidden" name="IPAddress" id="IPAddress" value="????"/>

    What would I place in the value field of the form to capture the IP?

  • Vote Up0Vote Down BenBen
    Posts: 3,489Sendy support

    It should be:

    value="<?php echo $_SERVER['REMOTE_ADDR'];?>"

This discussion has been closed.
All Discussions