Jump to content

IP in Contact Form.


Recommended Posts

Not a problem...

Open: contact-form.php
Find:

        if (intval($cookie->id_customer))
           $customer = new Customer(intval($cookie->id_customer));
       if (Mail::Send(intval($cookie->id_lang), 'contact', 'Message from contact form', array('{email}' => $_POST['from'], '{message}' => stripslashes($message)), $contact->email, $contact->name, $from, (intval($cookie->id_customer) ? $customer->firstname.' '.$customer->lastname : $from)))


Replace with:

        $ip_address = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : $REMOTE_ADDR;

       if (intval($cookie->id_customer))
           $customer = new Customer(intval($cookie->id_customer));
       if (Mail::Send(intval($cookie->id_lang), 'contact', 'Message from contact form', array('{email}' => $_POST['from'], '{ip_address}' => $ip_address, '{message}' => stripslashes($message)), $contact->email, $contact->name, $from, (intval($cookie->id_customer) ? $customer->firstname.' '.$customer->lastname : $from)))



Open: mails/contact.html
Find:

                E-mail address: {email}



Replace with:

                E-mail address: {email}



               IP address: {ip_address}


Share this post


Link to post
Share on other sites
  • 1 year later...
  • 7 months later...
Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More