Page 1 of 1

Capture IP Address from Contact form

Posted: Tue Jul 17, 2012 7:37 am
by mixxin
I would like to capture the IP Address from the contact form. I searched the forum and found a vqmod for a better contact form but it's not compatible with 1.5.3.1. Can a PHP guru give me the correct syntax on where to add this in catalog/controller/information/contact.php?

Sender's IP Address: ".$_SERVER['REMOTE_ADDR'];

Re: Capture IP Address from Contact form

Posted: Tue Jul 17, 2012 6:01 pm
by SAA
hi

edit:
file
catalog/controller/information/contact.php
line 21
$mail->setText(strip_tags(html_entity_decode($this->request->post['enquiry']." ip=".$_SERVER['REMOTE_ADDR'], ENT_QUOTES, 'UTF-8')));

Re: Capture IP Address from Contact form

Posted: Wed Jul 18, 2012 1:14 pm
by mixxin
Perfect SAA! Thank you!