PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
anyone know how to determine the distance between zip codes or if theres some functions floating around the net i can use freely to determine this (for usa residents)
You'd need a listing of all the zipcodes and their relative latitude and longitudes in order to do a distance calculation. Yes, there are things that exist for the US, but I believe for most of them you have to pay.
The German company I've worked with gave us geodata in both latitude/longitude and x/y format. They run an algorithm that basically flattens the earth so very simple algebra can be run during searches for fast distance calculations.
Check out Geonames for other countries. You do need the great circle algorithm. I know I use postgres but the method I use to access information quickly is to calculate the distance from a known location (In Germany, Aachen where I work) and store that information in the database as X,Y points (North,East as km). I can then simply use the database geometry functions/Trig rather than relying on calculating Great Circle each time. It needs a bit of pre-processing to get the North/East distances but is fast.