In PHP, I have the following code for calculating the distance between two locations:
Why don't you use MySQL's geospatial features...? No, just kidding.
If the 200 records are actual places like towns, etc then as an alternative could you use GeoNames' API?
The following webservice will provide the 10 closest locations to the lat and lng provided:
http://ws.geonames.org/findNearby?lat=47.3&lng=9
Source: http://www.geonames.org/export/web-services.html#findNearbyPlaceName
Full list: http://www.geonames.org/export/ws-overview.html