Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

ip address string?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #1  
Old 03-09-2004, 07:58 AM
 
concepts concepts is offline
 

Senior Member
  
Join Date: Nov 2003
Posts: 104
 

Default ip address string?

Can anyone tell me how to display the ip address string easily. I want to show this during checkout to discourage fraud.. is there a way to log the ip in checkout notes?
Reply With Quote
  #2  
Old 03-10-2004, 08:42 AM
 
anandat anandat is offline
 

X-Adept
  
Join Date: Jan 2004
Posts: 914
 

Default

Here is the code I use on my PHP pages but I don't know how to put this on checkout pages. I know it's not very difficult may be some X-cart guru
can help here.
Code:
<?php $IP = getenv("REMOTE_ADDR"); echo "Your IP address is $IP loged for security reasons"; ?>
__________________
X-Cart: 4.7.7 LIVE
Skin:Ultra by xcartmods.co.uk
X-cart Modules: | ACR, Rich Google Search, Customer Testimonials | Cloud Search, | Websitecm: CDSEO (2.1.9)
---------------
Server: Linux
php: 5.3
mysql: 5.0.89
----------------
Reply With Quote
  #3  
Old 03-13-2004, 05:13 AM
  Zaja's Avatar 
Zaja Zaja is offline
 

X-Adept
  
Join Date: Mar 2004
Location: The Universe is my home
Posts: 420
 

Default

Add this code to skin/customer/main/checkout.tpl :

Code:
{php} $IP = getenv("REMOTE_ADDR"); echo "Your IP address $IP is loged for security reasons"; {/php}
__________________
_/ _/ _/ _/ _/ _/ _/ _/ _/

7dana.com
Reply With Quote
  #4  
Old 06-11-2007, 10:34 PM
  shopccp's Avatar 
shopccp shopccp is offline
 

Advanced Member
  
Join Date: Oct 2006
Posts: 35
 

Default Re: ip address string?

I added the following code to the page. The IP address is not on the page.

Is there something I need to add to the server to make it on the page.

Any ideas?


Justin

Quote:
Originally Posted by Zaja
Add this code to skin/customer/main/checkout.tpl :

Code:
{php} $IP = getenv("REMOTE_ADDR"); echo "Your IP address $IP is loged for security reasons"; {/php}
__________________
X-Cart Gold v4.4.4
Apache v2.2.20
PHP v5.3.8
MySQL v5.1.56-log
Linux kernel v2.6.18-238.19.1.el5xen
Reply With Quote
  #5  
Old 06-12-2007, 12:13 PM
  shopccp's Avatar 
shopccp shopccp is offline
 

Advanced Member
  
Join Date: Oct 2006
Posts: 35
 

Default Re: ip address string?

Disregard above message. My server will not accept the above code, (getenv).

For all with the ip address not showing up - The following code will work:

Code:
{php} $ip = $_SERVER['REMOTE_ADDR']; echo "Your IP address is $ip logged for security reasons."; {/php}
__________________
X-Cart Gold v4.4.4
Apache v2.2.20
PHP v5.3.8
MySQL v5.1.56-log
Linux kernel v2.6.18-238.19.1.el5xen
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 01:15 AM.

   

 
X-Cart forums © 2001-2020