October 15th, 2007

Dynamic Images

So I’m working on the “about” section of my site, when I decided to photoshop a head shot to make it look cool and set it as a background for the text. Playing around with a couple of shots, I decided that I really liked both. However, I’m setting up the background using an attached CSS file, therefore I couldn’t dynamically change the source of the background. I could’ve gone with a JavaScript solution, but that would just be overkill. Oh, what to do?

Here’s what. You set a PHP file as the image background. PHP? Yes, not PNG, GIF, or JPG… PHP. How is this possible? Through the underrated power of MIME. In short, it’s sort of the format of the output of a page. A normal webpage has a META tag that looks something like this: <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> This tells your page that it’s supposed to output it’s content in the form of “text/html”.

Using this concept, we will output an image from from a PHP file. This script goes through a specific folder, and will output a random image from the folder.

Here’s the actual script.

Although this might be something you will not be using in every project, but at least you now know it’s possible.

Digg!
October 12th, 2007

Welcome to My Domain!

Welcome to the mad world that is web development and design.

I am a freelance web developer, and as such, I’ve had to extend my knowledge far beyond development languages and play the role of a web designer, accessibility, usability, and technology expert, entrepreneur, among other hats.

Now I’m here to share with you everything I’ve learned throughout the years. Having no formal training in none of these arts, I have the luxury of being able to write from 100% experience.

I will cover a wide range of topics related to the development, design, and improvement of web sites and applications. I’ll even throw in a few personal articles once in a while. I hope you find this site fun and educational, for I’m sure I will learn a lot and have fun by writing these articles as well.

Here we go…

Digg!