12 Apr

PHP Classes Constant Arrays

This is something I fought on Friday and got to the realization that PHP classes don’t support array constants. Not sure why not but sometimes you’re stuck with a situation and need a work around. In this instance I used static class variables in place of consts:

And when referencing this:

09 Apr

Google Maps Centering and Zooming

OK fought this for a while yesterday so thought I would share. The original objective was to display a Google Map with pointers for all the locations on the map, the map would then be re-zoomed and centered so all points show. Sounds simple! After hours of fighting the system the big problem is Google Maps wants to have the map centered and zoomed before adding any pointers. Here’s my take on this, BTW this was built from various other authors code snippets but the combination of them to make it work is my original code:

First off you need a div to put the map into.… Read the rest

09 Apr

Seth on the sweet soda tax

Interesting take from Seth Godin on the soda tax proposed in New York http://sethgodin.typepad.com/seths_blog/2010/04/rights-and-responsibilities.html

I find it fascinating that companies can sell a product that’s (supposedly) bad for you, they have alternatives available (including diet, water, and other beverages), and yet won’t help their customers move to the healthier alternatives. This isn’t tobacco where there is no healthier alternative, you either smoke or you don’t – here they could help wean people off full HFCS sodas to diet without losing their market or their sales.

This seems typical big company head in the sand thinking – if we fight it we keep the status quo.… Read the rest

08 Apr

Issues Creating and Downloading File in IE from PHP

Took a while to fix this one. The problem is you create a download button in HTML that leads to a PHP program that creates a file that Internet Explorer should download. The code works fine in Firefox just not IE.

The original code was something like:
{code type=php}
header(“Pragma: no-cache”);
header(“Expires: 0”);

header(“Content-disposition: attachment; filename=\”export.xls\”;”);
header(“Content-Type: application/vnd.ms-excel”);
{/code}
Which works in Firefox but not IE. The new code is:
{code type=php}header(“Pragma: “);
header(“Cache-Control: “);

header(“Content-disposition: attachment; filename=\”export.xls\”;”);
header(“Content-Type: application/vnd.ms-excel”);
{/code}
And that works fine.

06 Apr

Online Reputation Management Extortion

While extortion might seem a harsh word there have now been three companies that have found our false complaints in ripoffreport and have contacted us to inquire about helping fix the issue. Now obviously if they did any due-diligence they would know we to do online reputation management however these companies are obviously too ignorant to do even basic background checking before sending their offers of help (for a fee of course).

List of shame:

  1. Repspinner – first to respond through phone and email – twice.
  2. www.Reputation-Armor.net – just email so far
  3. www.reputationstore.com- just email so far

So why did I use the word extortion?… Read the rest