I understand that Google caps requests to 2,500 per day... but there's no way on EARTH that I've made that many requests today, and I just keep getting 'OVER_QUERY_LIMIT'
$street_no = get_post_meta($prop->ID, 'street_no', true);
$street = get_post_meta($prop->ID, 'street', true);
$street_suffix = get_post_meta($prop->ID, 'street_suffix', true);
$addr = urlencode( $street_no." ".$street." ".$street_suffix." BC Canada" );
$url = 'http://maps.googleapis.com/maps/api/geocode/json?address='.$addr.'&sensor=true';
$json_result = json_decode(file_get_contents($url));
if ( $json_result->status === "OVER_QUERY_LIMIT" ) :
sleep(2);
$json_result = json_decode(file_get_contents($url));
endif;
As you can see, if I get the status of OVER_QUERY_LIMIT
I tell the script to sleep for 2 seconds and then continue on... which seemed to work at some point this morning, but now I just can't even get a single address geocoded.
I'm at a loss as to what to do at this point... it makes my application utterly useless.