X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   ip address string? (https://forum.x-cart.com/showthread.php?t=6640)

concepts 03-09-2004 07:58 AM

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?

anandat 03-10-2004 08:42 AM

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";

?>


Zaja 03-13-2004 05:13 AM

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}


shopccp 06-11-2007 10:34 PM

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}



shopccp 06-12-2007 12:13 PM

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}



All times are GMT -8. The time now is 02:10 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.