kdogg Posted November 3, 2008 Posted November 3, 2008 Just like the topic asks. When a customer places either an order or hits the contact us on my webpage, I would like all emails and orders to include IP address and host mask information. Even just the IP is better then nothing. Is there a way to do this?
FIMBLE Posted November 3, 2008 Posted November 3, 2008 There is a contribution that does this for customers that have created an account it stores the IP number in with the other details that you can call. The Contact us form, Find (around line18) Find $name = tep_db_prepare_input($_POST['name']); $email_address = tep_db_prepare_input($_POST['email']); $phone = tep_db_prepare_input($_POST['phone']); $enquiry = tep_db_prepare_input($_POST['enquiry']); Add right after $enquiry = tep_db_prepare_input($enquiry . "\n\n IP: " . $_SERVER['REMOTE_ADDR']); Nic Sometimes you're the dog and sometimes the lamp post [/url] My Contributions
♥kymation Posted November 4, 2008 Posted November 4, 2008 $_SERVER['REMOTE_ADDR'] doesn't always return a useful result. The osCommerce function tep_get_ip_address() is a more reliable way of getting an IP address. Regards Jim See my profile for a list of my addons and ways to get support.
burt Posted November 4, 2008 Posted November 4, 2008 For your orders, amend 3 files: http://www.clubosc.com/recording-ip-addres...oscommerce.html
kdogg Posted November 8, 2008 Author Posted November 8, 2008 For your orders, amend 3 files:http://www.clubosc.com/recording-ip-addres...oscommerce.html I tried this 3 times. Doesn't seem to work. That or I'm looking in the wrong place. The email one worked but this one did not. I checked the files 3 times, I don't know what I'm doing wrong.
FIMBLE Posted November 10, 2008 Posted November 10, 2008 Anyone? A 2 second search of the contributions revealed this http://addons.oscommerce.com/info/2138 Sometimes you're the dog and sometimes the lamp post [/url] My Contributions
ruizerwin Posted November 10, 2008 Posted November 10, 2008 If you want just to add the ip address, you can use the global variable: $ip_address; or $HTTP_SERVER_VARS['REMOTE_ADDR'] Erwin D. Padilla Web Developer and Linux Admin
Recommended Posts
Archived
This topic is now archived and is closed to further replies.