• This is a great plugin, it works so well.

    I’m getting married and we have started to send out invites with a link to our RSVP website, but we’re running into a bit of a problem. When we setup the RSVP plugin and imported our guest list we chose not to use a verification code as we wanted to save ourselves and our guests a hassle.

    We decided to trust people to only put in their own name, but our trust was misplaced. We have someone who has now RSVP’d for 3 people who haven’t gotten invitations yet. We can’t figure out who it is, I think it’s someone who is upset about not getting invited.

    Is there any way to track the IP address of guests as they RSVP, both for the purpose of verifying their authenticity, and also to try to find out who this person is.

    If the Ip address could be added to the email alert that would be ideal. Any help is appreciated.

    https://www.ads-software.com/extend/plugins/rsvp/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter JamesStrang

    (@deathbyhicks)

    Ok, so now I have spent a few hours on this issue, I have come up with this solution so far.

    First I added a new custom question as “Private” I found that the name of the form field displayed for this question is “mainquestion4”.

    I then added
    ‘$ipaddress = $_SERVER[“REMOTE_ADDR”];’ to the top of rsvp_frontend.inc.php (right after <?php)

    and added
    ‘$form .= ” <input type=\”hidden\” name=\”mainquestion4\” value=\”$ipaddress\” />\r\n”;’
    to the list of hidden form fields in the same file.

    I know that my hidden form field works because I tested it separately, but I cannot get the IP address to be added to the field.

    I’m not very good with PHP, so any help would be appreciated. I think it may be a problem with the variable being global or local. Or could it be that I have used an incorrect code to grab the IP address?

    $form = "<form id=\"rsvpForm\" name=\"rsvpForm\" method=\"post\" action=\"$rsvp_form_action\">\r\n";
    	$form .= "	<input type=\"hidden\" name=\"attendeeID\" value=\"".$attendeeID."\" />\r\n";
    	$form .= "	<input type=\"hidden\" name=\"rsvpStep\" value=\"handleRsvp\" />\r\n";
    	$form .= "	<input type=\"hidden\" name=\"mainquestion4\" value=\"$ipaddress\" />\r\n";
    	$yesVerbiage = ((trim(get_option(OPTION_YES_VERBIAGE)) != "") ? get_option(OPTION_YES_VERBIAGE) :
    		__("Yes, of course I will be there! Who doesn't like family, friends, weddings, and a good time?", 'rsvp-plugin'));
    	$noVerbiage = ((trim(get_option(OPTION_NO_VERBIAGE)) != "") ? get_option(OPTION_NO_VERBIAGE) :
    			__("Um, unfortunately, there is a Star Trek marathon on that day that I just cannot miss.", 'rsvp-plugin'));

    Dbh –
    While I feel your pain, what good is having this person’s ip address going to do you?

    Thread Starter JamesStrang

    (@deathbyhicks)

    I will be able to tell if someone is registering more than one guest with the same IP address. I may also be able to track them down.

    Are you going to see the user’s IP address on their network, or the network’s IP address?

    I added it to the rsvp_frontend.inc.php script;

    On line 739 you will find this;
    ($sql = "SELECT firstName, lastName, rsvpStatus FROM ".ATTENDEES_TABLE." WHERE id= ".$attendeeID;)

    Under this line I added 2 lines;

    $ip = $_SERVER['REMOTE_ADDR'];
    $browser = $_SERVER['HTTP_USER_AGENT'];

    And under line 745 I added this;
    $body .= "$ip | $browser";

    This will send the IP-address and browser info in the notify e-mail.

    nice, that worked great!

    Couple notes/changes:
    – using plugin version 1.7.5
    – lines numbers didn’t matchup and also found 2 spots that matched what was noted on line 739. Of the two found I added it to the latter
    – Added line breaks too: $body .= “\r\n\r\n $ip | $browser”;

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Log IP address for guests’ is closed to new replies.