Forums / General Questions / Hotlink the IP address on Email Receipts?

Hotlink the IP address on Email Receipts?

Views: 1,143

Results 1 to 4 of 4
3 Aug 2011, 1:10 AM
#1
blackhalo avatar

blackhalo

Zen Follower

Join Date:
Feb 2008
Posts:
118
Plugin Contributions:
0

Hotlink the IP address on Email Receipts?

Hi guys, this is a simple idea... but not so easy due to hidden data!

At the bottom of every (admin) email receipt there's a section that looks this (except it has the customer details filled in):


Office Use Only:
From: ----
Email: ----
Login Name: ----
Login Email: ----
IP Address: 255.255.255.255
Host Address: ----
Date and Time: ----

All I want to do it make the IP Address,
hotlink to this IP Lookup website:

http://www.myiptest.com

I use this website to check whether the country matches the billing/shipping address...
if it does, great... if it doesn't, then I make a judgement call... and if it shows Nigeria, I cancel the order.

I've gotten into the habit of checking EVERY order, which has paid off more than once...
so it would be a lot easier if the IP address was a pre-filled hotlink to the website I mention above... click, done!

Any idea where to find the core IP address code for the email receipt?
Also, any idea how to make it dynamic so the IP address is entered into the lookup form automatically?

I'm just trying to streamline the process in as few steps as possible.

Thx

3 Aug 2011, 12:07 PM
#2
mprough avatar

mprough

Totally Zenned

Join Date:
Nov 2007
Location:
Woodbine, Georgia, United States
Posts:
4,305
Plugin Contributions:
39

Re: Hotlink the IP address on Email Receipts?

Since the IP test website uses no parameters in their urls to force the form action, you cannot....

This site does..... http://network-tools.com/

So for example, in the email template locate the string for the IP address and pre-pend it with

http://network-tools.com/default.asp?prog=express&host=

For a click-able link.

~Melanie

4 Aug 2011, 12:28 AM
#3
blackhalo avatar

blackhalo

Zen Follower

Join Date:
Feb 2008
Posts:
118
Plugin Contributions:
0

Re: Hotlink the IP address on Email Receipts?

Actually, out of curiosity I dug into their source and tried it.. it works...
just add the IP to the end of the URL string with a forward slash:

http://www.myiptest.com/staticpages/index.php/IP-Lookup/98.244.194.132

I still can't find the IP Address section of the admin email tho... all I see is a variable called "$EXTRA_INFO"...
and the Developers Tools results don't show anything regarding the data mentioned above... it's all unrelated???

Where does that "Office Use Only" data originate from?

4 Aug 2011, 12:44 AM
#4
blackhalo avatar

blackhalo

Zen Follower

Join Date:
Feb 2008
Posts:
118
Plugin Contributions:
0

Re: Hotlink the IP address on Email Receipts?

Please disregard the second half of the message above...
I found the IP data around line #506 in: includes/functions/functions_email.php

My PHP is a little rusty though...
I'm pretty sure this is escaped properly... yes?

'<tr><td class="extra-info-bold">' . OFFICE_IP_ADDRESS . '</td><td>' . '<a href="http://www.myiptest.com/staticpages/index.php/IP-Lookup/' . $_SESSION['customers_ip_address'] . '">' . $_SESSION['customers_ip_address'] . '</a>' . ' - ' . $_SERVER['REMOTE_ADDR'] . '</td></tr>' .

I don't have a test account setup to place a fake order... hehe...
I'm just trying to get it right the first time... and for forum posterity.

That should work, yeah?