PDA

View Full Version : code to grab referer


jason - jmh web services
10-04-06, 01:36 AM
any code in v5 to display referer?

wcw
10-04-06, 04:02 AM
Use the tool kit to save the system variable to a global variable.

Here is an example of getting the system variable for IP address.

<mvt:item name="toolkit" param="vassign|ip|remote_addr" />
Your IP: &mvt:global:ip;

jason - jmh web services
10-04-06, 04:05 AM
Use the tool kit to save the system variable to a global variable.

What is the system variable?

wcw
10-04-06, 04:07 AM
You'll need to look that up. It is in the resource documents for mivascript.

jason - jmh web services
10-04-06, 04:08 AM
You'll need to look that up. It is in the resource documents for mivascript.

k. thanks

wcw
10-04-06, 02:37 PM
I had a chance to look it up this morning. Here's the code

<mvt:item name="toolkit" param="vassign|camefrom|http_referer" />
<mvt:if expr="NOT ISNULL g.camefrom">
<br>You came from: &mvt:global:camefrom;
</mvt:if>


Here is where you can see it work.
http://www.pinemporium.com/mm5/merchant.mvc
Will take you to the mm5 store. Scroll to the bottom and you will see just an IP address on the left bottom. Click on "Store Front" in the nav bar and then look again. It will show the url you were last on, which is the above link.

Just another one of the dozens of things you can do with the Emporium Plus Tool Kit.
http://www.emporiumplus.com/go/wcw/PROD/1AA/1AA00223