Images display in Firefox and Safari, but not in Internet Explorer

Written on

I ran into a little "gotcha" today where an image was displaying properly in Firefox and Safari, but not in Internet Explorer. The weird thing is that it wasn't showing up as a broken link (no missing image icon with the infamous red 'X'). Instead, it wasn't showing up at all:

PHP functions to get and remove the file extension from a string

Written on

I use these regular expressions all the time, but it's much more convenient to have them both in convenient PHP functions.

Prevent white noise from appearing in images after fading

Written on

The first time I ever saw this alleged bug was in Internet Explorer 7 yesterday. Images were rotating on a page in the form of a slideshow, fading in and out for a nice, smooth transition. One problem, though: in Internet Explorer 7 (and 6, as it turned out), one of the images would appear with a small cluster of white pixels around the black areas.

A Beautiful Site becomes "A Beautiful Site, LLC"

Written on

Today has been an exciting day. I received documentation from the State of Florida stating that A Beautiful Site, LLC. is officially a limited liability company. This marks the new beginning of a period of growth for ABS, which has been, until now, a sole proprietorship.

Import/restore MySQL files from the command line

Written on

I don't use this very often, but when I do I always spend a decent amount of time trying to figure it out online. Here are the steps to import a large SQL file from the command line.

Parsing a JSON string results in an 'Invalid Label' error

Written on

Whenever I work with AJAX, jQuery is my preferred JavaScript library and PHP is my preferred server-side language. I use JSON whenever I can to pass data between JavaScript and PHP. After all, $.get and $.post both process JSON easily, so it's my data type of choice.

$.postJSON() for jQuery

Written on

$.getJSON() is pretty handy for sending an AJAX request and getting back JSON data as a response. Alas, the jQuery documentation lacks a sister function that should be named $.postJSON(). Why not just use $.getJSON() and be done with it? Well, perhaps you want to send a large amount of data or, in my case, IE7 just doesn't want to work properly with a GET request.

Generate random passwords in PHP

Written on

Here is a function I wrote to generate a random string in PHP. It is probably most useful for generating passwords. You can specify the length of the resulting string, as well as what characters are allowed. The default length is eight and the default character set is alphanumeric.

Fetching remote web pages with curl and PHP

Written on

This is a very brief example of how to use PHP's curl Library to retrieve the source of a remote webpage.

Determine file extensions using JavaScript

Written on

A quick JavaScript function to determine a file's extension.