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
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.
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 »
Posted by justinjohnson on Dec 27th, 2006
If you’re like me, you’ve fallen in love with CakePHP. It’s a tight bit of code that’s easy to use and once you have your application using it, easy to maintain and add new features. For my recent redesign of my freelance site www.systemsevendesigns.com I wanted to be able to display my 3 most recent blog posts on the homepage. Both sites run off of different databases, so how do we do it with Cake? (This post assumes you know a little bit about Cake, but is not too terribly complex. Cake newbies welcome!)
Continue Reading »
Posted by justinjohnson on Aug 14th, 2006
If your stuck in the world of developing on a Windows platform, chances are you’ve become quite envious of Textmate on the mac, especially if your a follower of the Ruby on Rails guys.
While I don’t offer a Textmate for the PC, I did find a version of the Monaco font (which Textmate uses by default) so that we PC users can be 1 step closer to a Textmate app for the PC.
Continue Reading »
Posted by justinjohnson on May 3rd, 2005
Pulling in $_POST or $_GET variables can be quite a pain sometimes, enter a handy built-in PHP function: extract()
Continue Reading »
Posted by justinjohnson on Apr 29th, 2005
One of the things that I find myself doing most often when creating a web app or even just a website using PHP/MySQL is formatting dates to the format that I want.
It’s not hard to do but it gets annoying and repetative very quickly
Continue Reading »