Using Phoogle with Wordpress (and Dreamhost)

Posted by justinjohnson on Jan 27th, 2007

Dreamhost is a great webhost, in fact if you use the promo code:PHOOGLE at signup you can get 1 year of their level1 hosting for 44.40 (which is less than 4.00 a month). This is normally priced at 119.40!, so you save $75.00!!

Back to the topic at hand. Phoogle by default uses file_get_contents() to access the Yahoo Maps API to get Latitude and Longitude data to pass to your Google Map. Dreamhost disables file_get_contents() for security purposes. However you can get around this by using CURL

Alex Hillman emailed me to tell me that he had written a post to his blog detailing his install of Phoogle on Wordpress and how to change it to use CURL so that it will work on Dreamhost (pretty simple actually)

Check out Alex’s blog post about Using Phoogle on Dreamhost

Phoogle Examples

Posted by justinjohnson on Jan 27th, 2007

When I migrated from my old blog/website/webhost one thing that got lost in the shuffle was the examples for the Phoogle Mapping class.

They can be found on the main phoogle page located at http://systemsevendesigns.com/phoogle

Next to the name of each example you will see a link that says source code, which links to a text file containing php code. Obviously you’ll need to change the API key to work with your API key and make sure that the path to phoogle.php is correct for your setup, but other than that you should just be able to copy and paste the examples.

CakePHP Zip Code Helper

Posted by justinjohnson on Jan 1st, 2007

If you need to calculate distance in a web app, or maybe say something like “User1 lives approximately 2.1 miles from User2″ then you’ve had to do the math to calculate distances between zip codes. It’s a great pain. In the past I’ve always used this really great class from MicahCarrick called PHP Zip Code Range and Distance Calculation class v1.2.0 ,for an upcoming CakePHP app that I’m building I need to do something like this. So I took Mr. Carrick’s class and converted it into a CakePHP Helper. Read on for code samples and instructions… Continue Reading »

Advertisements

Recent Posts

Categories

Archives

Meta: