$userAgent = isset($_SERVER['HTTP_USER_AGENT']) ? strtolower($_SERVER['HTTP_USER_AGENT']) : '';
$ext = 'png'; if(preg_match('/(?i)msie [1-6]/', $userAgent)) { $ext = 'gif'; }
// Give gifs to IE6 and below, the rest get nice transparent pngs - use $ext for each image desired.
?>