emanresu Posted January 2, 2004 Share Posted January 2, 2004 We'd like to capture the customers IP address on every order as this can help us verify some of the more obscure requests we get. Is there a quick way of adding this to orders.php? Citizen of US Minor Outlying Islands Link to comment Share on other sites More sharing options...
emanresu Posted January 3, 2004 Author Share Posted January 3, 2004 What we are trying to do is to use the IP address as a method of reducing Credit Card fraud. Found the IP address in whos_online (is this the only source?) and want to use this to create a query as follows: $query = "http://maxmind.com:8010/a?l=" . $license_key . "&i=" . $ipaddress;$url = parse_url($query); $host = $url["host"]; $path = $url["path"] . "?" . $url["query"]; $timeout = 1; $fp = fsockopen ($host, 8010, $errno, $errstr, $timeout); if ($fp) { fputs ($fp, "GET $path HTTP/1.0\nHost: " . $host . "\n\n"); while (!feof($fp)) { $buf .= fgets($fp, 128); } $lines = split("\n", $buf); $country = $lines[count($lines)-1]; fclose($fp); } else { # enter error handing code here } echo $country; This will allow us to query Maxmind to get their Fraud Rating. If your are interested in reducing Credit card fraud, how about some help. Citizen of US Minor Outlying Islands Link to comment Share on other sites More sharing options...
Guest Posted January 3, 2004 Share Posted January 3, 2004 this is done in most of the payment modules, and the cc company gets this (at least on the ones i use) as i get the customer info of who ordered and the ip address submitted from. i am using Linda's SEC, which displayes the customer ip address in the footer, as well as in the admin section of whos online. Link to comment Share on other sites More sharing options...
emanresu Posted January 3, 2004 Author Share Posted January 3, 2004 Thanks. I'll check it out Citizen of US Minor Outlying Islands Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.