PHP: Downloading remote content with CURL

July 7, 2010

With fopen becoming increasingly scarce on web hosts, CURL is becoming a better and better solution to retrieving remote content with PHP. CURL is a fairly standard PHP module and chances are if your host does not support it a simple ticket will have them installing it for you. Because I am constantly loosing my

PHP+Apache: Enabling XSS for iPhone apps with PhoneGap and jQTouch

June 24, 2010

I am currently working on developing an iPhone app for Northwest Nazarene University. Part of this app will need to connect to the school’s webserver to retreive items such as news feeds and shared photo galleries. Being primarily a web developer I have turned to two projects created by Nitobi persons, PhoneGap and jQTouch. PhoneGap

PHP: Recursively convert an object to an array

June 16, 2010

When pulling in array from outside data sources you often receive an array back. The problem is that sometimes even though you know you should have an array your application does not and therefore assigns it to the stdObject object, which of course is nothing. To make it usable you must convert it back into

PHP: Show error on screen when disabled by php.ini

June 16, 2010

It is quite common to run into situations where PHP errors are suppressed or written to a log file somewhere on a live, non-development server. If you are troubleshooting and need to see the error that can be a pain. Luckily PHP and Apache have provided us with two great workarounds. The first happens through

PHP: Add Google Analytics to an entire static HTML website with PHP

June 14, 2010

I am in a situation where I need analytics data and none is provided. The entire 35k+ file website is all static HTML running on a Windows IIS server. I am not familiar enough with Windows Server to know what sort of scripting capabilities there are, but I do have PHP available. I wrote a