PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Visitor's IP Address

  1. As a bit of a follow up to http://www.gravityhelp.com/forums/topic/forms-with-custom-action-can-form-only-send-email

    I have sucessfully used Gravity Forms to post to an external URL and that works great. The problem is that now all posts appear to be coming from the same user since I am reposting the data and losing the visitor's IP. How do I get the visitors IP from gform_post_submission_1?

    The IP will then be used in curl to submit the form again to the external URL

    Posted 12 years ago on Thursday October 20, 2011 | Permalink
  2. The external URL will allow you to provide an IP address, rather than reading the IP the HTTP request is coming from? And the posts where all appear to be coming from the same user? In WordPress, post authors are not determined by IP.

    The gform_post_submission hook has access to the entry object, so you can access the value of the IP address of the submitter like this:

    [php]
    $ip = $entry['ip'];
    Posted 12 years ago on Friday October 21, 2011 | Permalink
  3. Thanks.....not really sure I understand your question but that line of code is exactly what I needed.
    Thanks again.

    Posted 12 years ago on Friday October 21, 2011 | Permalink
  4. Hopefully that's all you need. Please let us know if you need more help.

    Posted 12 years ago on Friday October 21, 2011 | Permalink

This topic has been resolved and has been closed to new replies.