Tutorial? How About a Project!

In writing the articles on object oriented programming I have stuck with theory. After all, it is not language specific and takes less space to say what there is to say. However, I have been asked by serveral to provide a tutorial or include examples on object oriented code. Well, I’ve decided to do something more. My good friend Andrew Branch has pointed out many times before that we learn better when we do things ourselves. And so, in that spirit, we will start a new full-fledged project together. I will write along as we develope it about how we should try to do things, so we can...read more

PHP Package Management and Autoloading

In PHP 5 and greater there is a magic function called __autoload (note: two underscores). __autoload allows us to load a class on the fly so to speak. It only gets called when a class can not be found, then it has a chance to load the class. If the class still can not be found, you get your regular error stating so. __autoload can be really useful if all of your classes happen to be in one directory, but what happens if you are managing a large project with many packages of classes? We will look at some different options. Single Directory of Classes This is the simplest solution, and the best...read more

Mint, Stat’s and Design

Mint is a new product recently released to track the statistics on your website. It has gotten much attention from several areas, and I thought it would be worth it to check it out. I am currently using StatCounter.com to track the traffic to my site. It is really useful when you use their paid service which keeps track of more than the last 100 visits to your site (the free version cap). It lets you view all the regular stats as well as "drill down" to see the actual path a single visitor took through your site. But, it is a monthly subscription service, which means potenially hundreds of...read more

Dreamweaver and CSS Still Don’t Play Nice

After hearing about the new CSS based workflow of Dreamweaver 8, which came out yesterday evening, I had high hopes that the rendering engine for CSS and HTML would have been improved. Disappointingly, this wasn't the case. Why don't they try using the rendering engines for Firefox, Safari, and even IE. The first two are now completely open for use and the latter would be smart to include even if there is a liscencing fee. mediaRAIN, my employer, uses Macromedia Studio because we specialize in Flash products. However, we do many HTML/PHP projects as well. Dreamweaver has always been a favorite...read more

Logout from HTTP Authorization

This is a little trick to create a logout from your site if you are using HTTP Authentication. I am using it for a current project I'm working on where cookie based sessions won't reliably work. We (Derek Andriesian and I) are using HTTP Authenticaton to log into an account which is only accessed through javascript and image urls from other sites. Some browsers disallow cookies being set by sites other than the current one, so keepig the user logged in is not always possible using cookie-base session management. To use HTTP Authentication you just do this in your PHP: // retrieve the vars...read more