<?php

include ('init.php');

$lat = 34.1689;

$lng = -118.344;

$radius = 30;

$sql = "select DISTINCT code, (3958* 3.1415926 * sqrt((latitude - $lat) * (latitude- $lat) + cos(latitude / 57.29578) * cos($lat/57.29578)*(longitude - $lng) * (longitude - $lng))/180) as dist from ! where countrycode=? and (3958* 3.1415926 * sqrt((latitude - $lat) * (latitude- $lat) + cos(latitude / 57.29578) * cos($lat/57.29578)*(longitude - $lng) * (longitude - $lng))/180) < " . $radius ;
$zips = $osDB->getAll($sql, array(ZIPCODES_TABLE, 'US') );

print_r($zips);

?>