XTREME-SOURCE
Search:

Go Back   XTREME-SOURCE > TUTORIALS > TUTORIAL ARCHIVE > TUTORIALS: WEB DESIGN
Shoutbox
Loading...


Reply
 
Thread Tools Search this Thread Display Modes
 
Old 06-30-2006, 06:51 PM
kambodianboi's Avatar
Administrator
 
Join Date: Aug 2005
Posts: 3,223
Send a message via AIM to kambodianboi Send a message via Yahoo to kambodianboi
[PHP]Countdown Script

I cant think of any good tutorials, best if people would request something and I explain an outline of it, but anyways heres a countdown script. I use it for my Windows XP Reinstallation.

[PHP]
<?php
function countdown($month, $day, $year)
{
header ("Content-type: image/png");
$im = @ImageCreate (350, 19);
$background_color = ImageColorAllocate ($im, 255, 255, 255);
$text_color = ImageColorAllocate($im, 0, 0, 0);
$grey = ImageColorAllocate($im, 144, 144, 144);

/* Borders */
imageline($im, 0, 0, 0, 18, $text_color); // Left Line
imageline($im, 0, 0, 349, 0, $text_color); // Top Line
imageline($im, 349, 1, 349, 18, $text_color); // Right Line
imageline($im, 0, 18, 349, 18, $text_color); // Bottom Line

/* Timer */
$target = mktime(0, 0, 0, $month, $day, $year);
$today = time();
$difference = ($target-$today);
$hours =(int) ($difference/3600);

imagestring($im, 2, 10, 3, "Re-Installing XP in ".$hours." hours.", $text_color);

imagestring($im, 2, 260, 3, "Your Text", $text_color);

ImagePng($im);
}

// Usage countdown(month, day, year)
countdown(9, 9, 2006);
?>
[/PHP]

Out come is in hours, I can make it more in depth but not enough room on sigbar.
Want something, make a request, you will be delighted. :hiding:
__________________
Xbox 360 - 2 Games - 2 Controllers - 120GB Elite - Dead
PS3 - 23 BD Games - 13 PSN Games - 9 Controllers - 320GB - Alive
Wii - 6 Games - 4 Wiimotes - Alive
PC - Overkill - 3DMark06 [15316]- God like :]
PC - New Build - 3DMark06 [32092]

Gaming Generations | XnogarD Production - Soon!!!
Reply With Quote
 
Old 06-30-2006, 07:14 PM
Administrator
 
Join Date: Oct 2005
Posts: 4,114

interesting.....someday I'll get the bug to try out some php.
Reply With Quote
 
Old 07-01-2006, 09:17 AM
Moderator
 
Join Date: Mar 2006
Posts: 3,497
Send a message via AIM to .:MAG:. Send a message via MSN to .:MAG:.

Need a little clarification on this...

Do we have to save it in a certain program or just place it into our sig?
__________________
::XSGfX::
::My dA::
Reply With Quote
 
Old 07-01-2006, 10:35 AM
kambodianboi's Avatar
Administrator
 
Join Date: Aug 2005
Posts: 3,223
Send a message via AIM to kambodianboi Send a message via Yahoo to kambodianboi

You have to copy and paste it on to a text base editor "notepad.exe." then save it as "coutdown.php" and set it on a php server. I will create a tutorial on setting up your very own server off your computer.
__________________
Xbox 360 - 2 Games - 2 Controllers - 120GB Elite - Dead
PS3 - 23 BD Games - 13 PSN Games - 9 Controllers - 320GB - Alive
Wii - 6 Games - 4 Wiimotes - Alive
PC - Overkill - 3DMark06 [15316]- God like :]
PC - New Build - 3DMark06 [32092]

Gaming Generations | XnogarD Production - Soon!!!
Reply With Quote
 
Old 07-01-2006, 08:15 PM
Moderator
 
Join Date: Mar 2006
Posts: 3,497
Send a message via AIM to .:MAG:. Send a message via MSN to .:MAG:.

Man, I knew something that cool wouldn't come easy!

Thanks for the help kam.
__________________
::XSGfX::
::My dA::
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


vBulletin 3.7.1 ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0