Akopia Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

[mv] How Do You Get The Visitor's IP Address?



******    message to minivend-users from "Cameron B. Prince" <cbp@InternetExpertsLLC.com>     ******

Hi list,

I am having a heck of a time trying to get the visitor's ip address.

Here's what I have tried after not finding much in the list:

[perl]
  $ip = $ENV{REMOTE_ADDR};
  return $ip;
[/perl]


And also basically the same in a GlobalSub


As well as a GlobalSub calling an external script:

Calling GlobalSub from page:

[perl arg=sub interpolate=1]CaptureIP()[/perl]

GlobalSub from minivend.cfg:

GlobalSub <<EOF
sub CaptureIP {
my $ip = system("perl -s /var/lib/minivend/iellc/ip_address.pl");
$Vend::Session->{scratch}->{ip_address} = $ip;
return "$ip";
}
EOF

ip_address external perl script:

#!/usr/bin/perl

sub ip {
       my $ip = $ENV{'REMOTE_ADDR'};
       return $ip;
        exit;
}



None of these produce the ip address.

Any hints?


Thanks,

Cameron

-
To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list


Search for: Match: Format: Sort by: