uShop English (U.S.) for 179!

uStorekeeper English (U.S.) for 149!

 Products
       uTest
       uReserve
       uShop
       uStorekeeper
       uGolf
       uDirectory
       uSignIn
 Tech Support
       Support Policy
       Knowledge Base
            uTest
            uReserve
            uShop
            uStorekeeper
            uGolf
            uDirectory
            uSignIn
       Documentation
       Reference Sites
 Legal
       Software Piracy
       Legal Notices
       Privacy Policy
       Licensing
 Miscellaneous
       Reseller Info
       Contact Us
       Site Map
IP Adress in e-Mail Confirmation

Knowledge Base Lobby : uShop Support Conference : General Questions
Nov-18-17 03:39 AM EST
Original Message
IP Adress in e-Mail Confirmation
Author ralf schwab on 07-15-2002 at 04:42 (EST)
Hello,

i have integrated in the customer e-mail order
confirmation the IP Adress.
The following code was integrated by me in the ushop.cgi:

$order_footer = &get_cart_html();
if (($settings[71] =~ /S/) && ($settings[71] ne "NONE"))
{
$order_footer .= &substitute_key_fields($settings[71]);
}
if (($REMOTE_ADDR =~ /S/) && ($REMOTE_ADDR ne "Nicht festgestellt"))
{
$order_footer .= "(Sicherheits-Check: Wir haben Ihre PC-INTERNET-ADRESSE aufgezeichnet.
Die Bestellung kam von folgendem Computer: : $REMOTE_ADDR ";
}

Now my Question:
I recieve in the e-mails as IP Adress allways
the same Number (195.20.224.126).
I have installed the ushop.cgi script in a SSL
Secured Directory is this perhaps the reason
for the same ip-adress ?

with best regards

schwab ralf

E-MAIL AUTHOR | TABLE OF CONTENTS

Table Of Contents
  RE: IP Adress in e-Mail Confirmation Bill Weiner, 2002-07-15 05:15:04 (1)
            external script ? yes ralf schwab, 2002-07-15 12:50:27 (2)
                 RE: external script ? yes Bill Weiner, 2002-07-16 05:16:07 (3)
                      IP Adress ralf schwab, 2002-07-18 02:50:58 (4)
                           RE: IP Adress Bill Weiner, 2002-07-18 05:24:12 (5)
                                REMOTE_ADRESS ... ralf schwab, 2002-09-04 14:51:08 (6)
                                     RE: REMOTE_ADRESS ... Bill Weiner, 2002-09-05 04:28:41 (7)
                                          IP Adress in e-Mail Confirmation Sommay, 2003-04-01 21:20:40 (8)
                                               RE: IP Adress in e-Mail Confirmation Bill Weiner, 2003-04-02 07:35:05 (9)
                                                    ORDER NUMBER TO THE SUBJECT Sommay, 2003-04-03 00:28:14 (10)
                                                         ORDER NUMBER TO THE SUBJECT Microburst Support Team, 2003-04-03 06:34:23 (11)
                                                              IP Address Sommay, 2003-04-03 22:58:23 (12)
                                                              Same IP address display Sommay, 2003-07-08 21:13:37 (13)
                                                                   RE: Same IP address display Bill Weiner, 2003-07-09 06:52:23 (14)
                                                                        Same IP addresses on every order! Sommay, 2003-07-09 17:12:26 (15)
                                                                             IP address Sommay, 2003-07-17 15:10:18 (16)
                                                                                  IP Address Microburst Support, 2003-08-04 09:55:10 (17)

Messages In This Discussion
         1. RE: IP Adress in e-Mail Confirmation
        Author Bill Weiner on 07-15-2002 at 05:15 (EST)
The $REMOTE_ADDR is the same for all of your customers? (Not just your testing?)

Are you using any external payment processing system to collect the payment information and then transfer back to the uShop CGI script? If not, then it may just be something with how your server is setting the REMOTE_ADDR environment variable.

TABLE OF CONTENTS
                 2. external script ? yes
                Author ralf schwab on 07-15-2002 at 12:50 (EST)
Hi Bill,

in deed !
I have installed a cgi-script in my ssl directory,
which collects (via SSL secured connection), the
creditcard data - but ONLY the creditcard-data.
All other payment methods (POD,ADVANCE PAY,Innovice....)
use NOT the cgi-script.
But i think that makes the same ip - but why ?

best regards
schwab ralf
TABLE OF CONTENTS
                         3. RE: external script ? yes
                        Author Bill Weiner on 07-16-2002 at 05:16 (EST)
What's probably happening is that since all credit card transactions are going through that other CGI script... it's that CGI script's IP that you are always getting.

What may have to be done in order to get the customer's $REMOTE_ADDR is to obtain and save the customer's $REMOTE_ADDR before the credit card transaction script is run. I'm not sure exactly how you're interfacing with the other script, but here are a couple suggestions:

1) Obtain the customer's REMOTE_ADDR before transferring to your credit card transaction script. The REMOTE_ADDR can be obtained with the following line of Perl code:

$REMOTE_ADDR = $ENV{'REMOTE_ADDR'};

2) Save the $REMOTE_ADDR in a temporary file or, if the credit card transaction script will pass variables through for you, pass it as a parameter to your credit card transaction script.

3) In uShop's "complete_order" subroutine, re-obtain the $REMOTE_ADDR from whatever method use used to save it in step 2 above.

Again, I can't give you complete instructions since I don't know exactly how your setup is... but maybe this will give you some ideas?
TABLE OF CONTENTS
                                 4. IP Adress
                                Author ralf schwab on 07-18-2002 at 02:50 (EST)
Hello Bill,

i understand that the REMOTE_ADDR is taken from
the e-Mail CGI-Script in our SSL directory.
But, what i don`t understand is, why the
REMOTE_ADDR is taken if you dont use the SSL
secured CGI-Script. We use this script only if
a customer pays via Credit-Card. On the order
review page i have integrated a link to the
Script Url.
This script is not used by other payment methods.

Perhaps the same IP depends on the URL of our
Ushop.cgi, which is located at:
https://ssl.kundenserver.de/ssl.friseurversand.com/ushopd/ushop.cgi
My shopping site is located at http://www.friseurversand.com

Is this the reason therefore ?

With best regards

schwab ralf

TABLE OF CONTENTS
                                         5. RE: IP Adress
                                        Author Bill Weiner on 07-18-2002 at 05:24 (EST)
The REMOTE_ADDR is the IP address of the remote host making the request. Typically, this will be user's browser making the request, so the REMOTE_ADDR will be set to the IP address of the user... or rather the IP address of the user's connection through his/her Internet Service Provider. In cases where the request comes from another CGI script/application that redirects or POSTs the request, then the REMOTE_ADDR would be set to that of the other CGI script/application (This is often the case of external payment processing systems redirecting or POSTing their approved/denied response back to the uShop CGI script.)

Now, if you are saying that the IP address being recorded as the REMOTE_ADDR is the same regardless of whether the customer utilized your external payment processing system... or just utilized one of the standard uShop payment options... then there is probably some application/service setup on your server that the requests are first being sent through. You could probably verify that with your Web Hosting Provider.... and/or by doing some tests yourself. One such test might be to utilize the $REMOTE_ADDR = $ENV{'REMOTE_ADDR'}; (described in my previous post) to obtain/display the $REMOTE_ADDR at a different point in the order process... like perhaps on the "display_review_order_form" subroutine, which would normally be displayed directly from the user's request after filling out the first order form and pressing the "Continue" button. Another test might be to just add the lines:

$REMOTE_ADDR = $ENV{'REMOTE_ADDR'};
print "$REMOTE_ADDR";

... to the "cgitest.pl" script that came with uShop. See if the IP address is always the same there.

But again, you may be able to confirm with your Web Hosting Provider if requests on your server are being redirected through some application/service such that the REMOTE_ADDR is always being set to the same value.
TABLE OF CONTENTS
                                                 6. REMOTE_ADRESS ...
                                                Author ralf schwab on 09-04-2002 at 14:51 (EST)
Hi Bill,

now i know why i get always the same ip-adress (in my order-confirmation).
I have installed the GERMAN ushop.cgi in a SSL
Directory that the User see the whole Order
Process is 128-bit secured (Lock Symbol in the
Browser).
My ENGLISH ushop.cgi is in a "normal" Directory
The English orders are all with the correct IP
Adress of the user - so the problem is the SSL
Directory.
Is there a way to get the IP Adress BEVORE the
User starts the ushop.cgi, save it and insert
it then in the order confirmation ?

with best regards

schwab ralf
www.friseurversand.com
TABLE OF CONTENTS
                                                         7. RE: REMOTE_ADRESS ...
                                                        Author Bill Weiner on 09-05-2002 at 04:28 (EST)
I don't know of any way to get the IP address of the user via Java or JavaScript. What you could try doing is writing your own CGI script that gets the IP address, stores it as a cookie, and then later have your uShop CGI script read the cookie. Perhaps use the "cookies.pl" script that comes with uShop as an example.

Probably the easiest thing to do, however, is to just figure out why your SSL server is not setting the REMOTE_ADDR environment variable. That's got to be some sort of server setting.
TABLE OF CONTENTS
                                                                 8. IP Adress in e-Mail Confirmation
                                                                Author Sommay on 04-01-2003 at 21:20 (EST)
Hi Bill

I also would like to add IP Adress in e-Mail Confirmation and also for the Order Number to appear in the eMail subject line. I'm using the New uShop 3.6 Authorize.Net SIM Interface
TABLE OF CONTENTS
                                                                         9. RE: IP Adress in e-Mail Confirmation
                                                                        Author Bill Weiner on 04-02-2003 at 07:35 (EST)
For uShop 3.5 or 3.6:

INSTRUCTIONS TO ADD THE IP ADDRESS TO THE EMAIL CONFIRMATION
------------------------------------------------------------

STEP 1: Make a backup of your current ushop.pl script... just in case.

STEP 2: Open your ushop.pl script with any text editor such as WordPad.

STEP 3: Do a search on the following line:

$receipt_text = &get_receipt_text("YES");

STEP 4: Immediately AFTER that line, add these two lines:

$REMOTE_ADDR = $ENV{'REMOTE_ADDR'};
$receipt_text .= "nIP Address = $REMOTE_ADDRn";

STEP 5: Save the script ... as TEXT if your editor asks... and try it out!


INSTRUCTIONS TO ADD THE ORDER NUMBER TO THE SUBJECT OF THE EMAIL CONFIRMATION
-----------------------------------------------------------------------------

STEP 1: Make a backup of your current ushop.pl script... just in case.

STEP 2: Open your ushop.pl script with any text editor such as WordPad.

STEP 3: Do a search on the following line:

$receipt_text = &get_receipt_text("YES");

STEP 4: Immediately AFTER that line, add these two lines:

$settings[7] .= "($order_number)";
$settings[8] .= "($order_number)";

STEP 5: Save the script ... as TEXT if your editor asks... and try it out!


TABLE OF CONTENTS
                                                                                 10. ORDER NUMBER TO THE SUBJECT
                                                                                Author Sommay on 04-03-2003 at 00:28 (EST)
Hi Bill, I added the following instruction:


$receipt_text = &get_receipt_text("YES");
$settings[7] .= "($order_number)";
$settings[8] .= "($order_number)";
$REMOTE_ADDR = $ENV{'REMOTE_ADDR'};
$receipt_text .= "nIP Address = $REMOTE_ADDRn";

Both are now working however I am receiving Order Notification twice and the IP address appear at the bottom of the eMail message.

I would like to receive only one Order Notification and have the IP address appear on top of the eMail message, just above the order number. Note: My customer only received single Order Receipt, which is what I wanted.

Thank you very much
TABLE OF CONTENTS
                                                                                         11. ORDER NUMBER TO THE SUBJECT
                                                                                        Author Microburst Support Team on 04-03-2003 at 06:34 (EST)
If you are receiving the order notification twice, check your settings in the uShop Control Panel - it sounds like you have set up both a primary and secondary email address (either both emails are ones that you check, or they are both identical) to be notified of the order. Go ahead and e-mail us a diagnostic report (support@uburst.com) if this is not the case.

If you want the IP address on top of the email message, rather than at the bottom, change your logic above to be like this instead:

$receipt_text = "nIP Address = $REMOTE_ADDRn";
$temp_receipt_text = &get_receipt_text("YES");
$receipt_text .= $temp_receipt_text;
$settings[7] .= "($order_number)";
$settings[8] .= "($order_number)";
$REMOTE_ADDR = $ENV{'REMOTE_ADDR'};
TABLE OF CONTENTS
                                                                                                 12. IP Address
                                                                                                Author Sommay on 04-03-2003 at 22:58 (EST)
Its working! Thank you...

I did have both primary and secondary email identical addresses
TABLE OF CONTENTS
                                                                                                 13. Same IP address display
                                                                                                Author Sommay on 07-08-2003 at 21:13 (EST)
The IP address does appear the way I want, but I just noticed the three fixed IP appear in every order notification, here are the three IP: 64.94.118.192, 64.94.118.193 and 64.94.118.195

I have no idea who IP this is

TABLE OF CONTENTS
                                                                                                         14. RE: Same IP address display
                                                                                                        Author Bill Weiner on 07-09-2003 at 06:52 (EST)
Do you mean that on all of your orders, one of those three IP addresses shows up as the user's IP address?

If so, are you interfacing with any payment processing system? (The IP address could just always be from the payment processing system.)

Or perhaps there is some additional relay to your server that is aways resulting in the same referrer IP?
TABLE OF CONTENTS
                                                                                                                 15. Same IP addresses on every order!
                                                                                                                Author Sommay on 07-09-2003 at 17:12 (EST)
1. The three IP addresses shows up as the user's IP address on every order.

2. We are using uShop 3.60, authorizenet.com for payment processing system.

What do I need to do to solve this problem?
Sommay
TABLE OF CONTENTS
                                                                                                                         16. IP address
                                                                                                                        Author Sommay on 07-17-2003 at 15:10 (EST)
I'm still waiting for your reply on how to solve the problem above

Sommay
TABLE OF CONTENTS
                                                                                                                                 17. IP Address
                                                                                                                                Author Microburst Support on 08-04-2003 at 09:55 (EST)
The REMOTE_ADDR is the IP address of the remote host making the request. Typically, this will be user's browser making the request, so the REMOTE_ADDR will be set to the IP address of the user... or rather the IP address of the user's connection through his/her Internet Service Provider. In cases where the request comes from another CGI script/application that redirects or POSTs the request, then the REMOTE_ADDR would be set to that of the other CGI script/application (This is often the case of external payment processing systems redirecting or POSTing their approved/denied response back to the uShop CGI script.)

What may have to be done in order to get the customer's $REMOTE_ADDR is to obtain and save the customer's $REMOTE_ADDR before the credit card transaction script is run.
1) Obtain the customer's REMOTE_ADDR before transferring to your credit card transaction script. The REMOTE_ADDR can be obtained with the following line of Perl code:
$REMOTE_ADDR = $ENV{'REMOTE_ADDR'};
2) Save the $REMOTE_ADDR in a temporary file or, if the credit card transaction script will pass variables through for you, pass it as a parameter to your credit card transaction script.
3) In uShop's "complete_order" subroutine, re-obtain the $REMOTE_ADDR from whatever method use used to save it in step 2 above.
TABLE OF CONTENTS

© 2003 Microburst Technologies, Inc.