Capture IP Address/Date Joined on Signup?
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?
This discussion has been closed.
Comments
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
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?
It should be:
value="
<?php echo $_SERVER['REMOTE_ADDR'];?>
"