Support » Plugin: Contact Form DB » How to save the source link to my website?

  • hi. please help me.
    (How to save the source link to my website?)
    i changle REMOTE_ADDR—> HTTP_REFERER , then it not work.

    public function getIPAddress() {
    foreach (array(‘HTTP_CLIENT_IP’, ‘HTTP_X_FORWARDED_FOR’, ‘HTTP_X_FORWARDED’, ‘HTTP_X_CLUSTER_CLIENT_IP’, ‘HTTP_FORWARDED_FOR’, ‘HTTP_FORWARDED’, ‘REMOTE_ADDR’) as $key) {
    if (array_key_exists($key, $_SERVER) === true) {
    foreach (explode(‘,’, $_SERVER[$key]) as $ip) {
    $ip = trim($ip); // just to be safe
    if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE) !== false) {
    return $ip;
    }
    }
    }
    }
    }

    Thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Michael Simpson

    (@msimpson)

    Most forms do not report the page that they are on when submitting to the server. On the CFDB Options page there is a setting for “Save Page URL from Contact Form 7 submissions”

    Hi. Thank you reply. I look it and i have config, but Page Title and empty
    Page URL is empty.

    result:

    your-email : okie
    tel-842 : Okie
    Page Title: empty
    Page URL: empty

    i don’t understand.

    good luck to you

    Plugin Author Michael Simpson

    (@msimpson)

    If the form appears on a page or post then you should get the page title and URL. But if you put the form in a widget then CF7 may not report this value to CFDB. Another user had this issue. CFDB can only save what CF7 reports to it.

    hi okie. that right and i understand. thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to save the source link to my website?’ is closed to new replies.