Darryl E. Clarke

Linux, PHP, MySQL, Apache, Development and More . . .

Archive for the ‘Uncategorized’


Geocodes Made Easy

Using my Google Maps API key I can geocode almost anything*.

And with Zend Framework, it’s f’n damn simple!

Zend_Loader::loadClass('Zend_Rest_Client');
$rest = new Zend_Rest_Client('http://maps.google.com/maps/geo');
//?q=1600+Amphitheatre+Parkway,+Mountain+View,+CA&output=json&oe=utf8&sensor=true_or_false&key=your_api_key

$rest->key('YOUR_API_KEY');
$rest->q('1600 Amphitheatre Parkway, Mountain View, CA');
$rest->output('xml');
$rest->oe('utf8');

$result =  $rest->get();
// the whole $result is a SimpleXML object
print_r((string)$result->Response->Placemark->Point->coordinates);

And that’s it.  Save the results someplace useful so you don’t have to hammer the shizzle out of Google (there are query limitations per key).

* I mean almost anything, because you cannot geocode a UK Postal Code, because the Queen and her Royal Mail owns the copyrights on it. Silly, I know.

Feedburner

I’ve enabled feedburner on the site, if you’re an RSS subscriber feel free to update your links to: http://feeds.darrylclarke.com/darrylclarke-com/

Thanks!

“Yes, There IS A Better Search Engine” – 10 Years Ago!

In an age where Go.com was new, and the Netscape and Yahoo Portals ruled the Web, one start-up company “with the unlikely name of Google.com” is showing the way. Salon.com in December of 1998 produced one of the first ever reviews or for that fact, mentions of Google.com still around on the internet today.

Some interesting shit about google, i guess.. and I’m just testing the digg to my blog feature. :P

read more | digg story