<?php
# Define countdown, if using a countdown
$day 7;
$month 7;
$year 2012;
$days = (int)((mktime (0,0,0,$month,$day,$year) - 
time(void))/86400);
$days $days+1;

# Your image goes here
$image = new Imagick("../images/seaside.jpg");
$draw = new ImagickDraw();

/*
$x and $y attributes and the text that's displayed
The $x and $y attributes are for moving the text from the left or top by pixels after setting the gravity.
*/
$x 0# pixels from the left
$y 30# pixels from the top
$text "$days days til Vacation!";

# The font and font attributes
$draw->setFont("Times-Italic");
$draw->setFontSize(40);
$draw->setFillColor("white");
$draw->setStrokeColor("white");
$draw->setStrokeWidth(0.5);
$draw->setGravity(Imagick::GRAVITY_NORTH);
$image->annotateImage($draw$x$y0$text);

/*
Other gravity settings
Imagick::GRAVITY_NORTHWEST
Imagick::GRAVITY_NORTH
Imagick::GRAVITY_NORTHEAST
Imagick::GRAVITY_WEST
Imagick::GRAVITY_CENTER
Imagick::GRAVITY_EAST
Imagick::GRAVITY_SOUTHWEST
Imagick::GRAVITY_SOUTH
Imagick::GRAVITY_SOUTHEAST
*/

# Make headers
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0"false);
header("Pragma: no-cache");
header("Content-type: image/jpeg");
echo 
$image;
?>