ZERO_RESULTS from the geocode API for business zip codes

We recently ran into a scenario where finding a zip code internationally was not producing any results.|postal_code:4901

   "results" : [],
   "status" : "ZERO_RESULTS"

We read a little more into the zip code structure in Switzerland and found that it’s a business zip code and didn’t provide lat/lng data like a normal zipcode would (apparently 4901 has a parent zip code of 4900) — that wasn’t helpful news tho.  However, we found a way that hacks the other API structure using the “address” parameter instead of “components”.  You just need to add the word “country” before it – otherwise the results find information to an address in Michigan. Switzerland 4901

The above URL was able to get us the data that we needed for finding locations that were near this zip code.  We haven’t had any rogue results from this method, so hopefully this can help someone else out in the future.

Enumerate Gmail Contacts

Here’s some sample code I’ve piled together to list gmail contacts:

require_once 'Zend/Loader.php';

$user = '';
$pass = 'password';

// Using Client Login
$client = Zend_Gdata_ClientLogin::getHttpClient($user, $pass, 'cp');
$gdata = new Zend_Gdata($client);
$query = new Zend_Gdata_Query(''.$user.'/full');
$feed = $gdata->getFeed($query);

$xml = new SimpleXMLElement($feed->getXML());
$entries = $xml->children('');

foreach ($entries->entry as $entry )
	$defaults = $entry->children('');
	echo 'title: '. $entry->title."\n";
		echo ' email: '.$defaults->email->attributes()->address."\n";
	echo ' address: '.$defaults->postalAddress."\n";
	echo "\n";

Highrise API Wrapper

Since Soocial no longer syncs with highrise, I’ve been looking for another solution to sync with my google apps.  I’ve decided I’ll be writing my own, which I will release later.

In the mean time, I’ve found a Highrise API wrapper which should come in handy so I don’t have to deal with cURL as much.

$p = Push_Highrise();

Soocial Highrise Sync

There were two main reasons I went with Highrise for CRM.  First, because of its simplicity, and second because of its ability to sync with Soocial.  This functionality is advertised on their website yet when you go to actually do the sync, Soocial states that 37 Signals has requested they disable synchronization.


A little investigation points the finger at Soocial.  There were bugs in their implementation that resulted in the deletion and recreation of contacts, removing relations and detaching deals and cases from the contacts.

It looks like I’ll be writing my own implementation eventually using the Highrise API and the Google Apps API.

Gmail Labs Escape Hatch

If (when) a Labs feature breaks, and you’re having trouble loading your inbox, there’s an escape hatch. Use

The same for google apps

Use[domain name]/?labs=0. Replace [domain name] with your google apps domain.