PHP scripts

Ecommerce fraud detection with PHP

I manage a medium size Ecommerce website (Portafixe.com) and we were starting to get alot of transactions that looked very suspicious. I saw that all of them were made from very diffents locations than the credit card billing address. From there, I made a small script (PHP) that calculate the distance between the IP location and the shipping address and today i'm giving it to you. Once you have the distance, you simply judge what distance is acceptable (because it's not precise as a GPS!).

Script (php) to store coordinates of zip codes or postal codes in mysql database with Google geocode and calculate the distance between 2 locations.

The following script was designed to get distance between 2 zip codes or postal code (tested with Canada and USA). It is possible to do one by one with google API but I prefer to have the coordinates stored into my own database for speed and reliability. Once you have those coordinates, a simple function can calculate the distance between 2 location using zip/postal code.