PDA

View Full Version : [PHP] Image countdown script



lSnowie
18-10-2008, 08:28 PM
Does anyone have the script for an image countdown like

http://www.yourhabbo.co.uk/christmas/c2.php

H0BJ0B
18-10-2008, 11:36 PM
http://www.minisitegallery.com/blog/php-javascript-countdown-script-with-timezone-setting.html

Very helpful site that guides you through it!

Dilore
19-10-2008, 02:17 PM
Taken from PHP.net :

<?php

header("Content-type: image/png");
$string = $_GET['text'];
$im = imagecreatefrompng("images/YOURIMAGE.PNG");
$orange = imagecolorallocate($im, 123, 210, 60);
$px = (imagesx($im) - 7.5 * strlen($string)) / 2;
imagestring($im, 3, $px, 15, $string, $orange);
imagepng($im);
imagedestroy($im);

?>

Want to hide these adverts? Register an account for free!