Looking for a Php program that would look up Zip codes and list within X Miles

Hello,

I am looking for a Php program/function which one could call to get all Zip codes within X miles of a given Zip code for the given country.
So for example one would call this function like

get_zip_codes_nearby($zipcode, $miles, $country);

And if one calls this function with for example;
$zipcode = 94109
$miles,= 25 Miles (meaning withitn 25 Miles of this Zip code)
$country = USA

Then one would get results like:

94104
94105
94107
94108
94109
94110
94111
94112

Regards,