Return to index
Page: 1, 2
Printable Version Abbreviations
GOURANGA! Forums > General > GTA Discussion > VC For PC Countdown Script
Post 1 | New
Icey
the pirate. arrr

Icey's Avatar


  • Joined: Feb '03
  • Posts: 1,455
  • Type: Administrator
Here you go people. Save this into something like countdown.php and then use this on your main page:

Code:
<? include("countdown.php"); ?>


Code:
<?

// Countdown
// Written by ICEY
// http://icey.gouranga.com
// icey@gouranga.com
// feel free to use anywhere

/* SETTINGS */

// hour, minute, second, month, day, year
$destcount = mktime(0,0,0,5,16,2003);

// released message
$isreleased = "VC For PC Released In Europe!";

// unreleased message
$unreleased = "Until European VC On PC Released!";

/* MAIN CODE */

// get current time as array
$curtime = explode(" ", microtime());

// find the time difference
$totaltime = $destcount - $curtime[1];

// check if it has been released
if ($totaltime <= 0) {

      // vc has been released so tell the world!
      echo($isreleased);

// vc hasnt been released, so run the following code instead
} else {

      // divide the total time by the number of seconds in a day
      $daysleft = intval($totaltime / 86400);

      // get the time minus days
      $timeleft = ($totaltime - ($daysleft * 86400));

      // get the hours, minutes and seconds
      $timeleft = date("H:i:s", $timeleft);

      // output the data
      echo($daysleft . " Days, " . $timeleft . " " . $unreleased);

// end check to see if vc has been released on pc
}

?>


------------------
http://img150.imageshack.us/img150/7684/bronze6cy.jpg
Post 2 | New
Deleted Member
    A JavaScript counter would be better, since it can it can actually count down (without having to reload the page every second :D )
    Post 3 | New
    RoadKill
    I'm here, sort of. Not much.

    • Joined: Feb '03
    • Posts: 168
    What, say like this: www.tinyurl.com/69xc ;)
    Post 4 | New
    Deleted Member
      That's Java, not JavaScript, but it does the trick :Y
      Post 5 | New
      Icey
      the pirate. arrr

      Icey's Avatar


      • Joined: Feb '03
      • Posts: 1,455
      • Type: Administrator
      True, but you dont need any special stuff with mine. With java you have to have the java thing installed and have to wait for it to download and so on...

      ------------------
      http://img150.imageshack.us/img150/7684/bronze6cy.jpg
      Post 6 | New
      GtAkReYz
      (^_^) /

      GtAkReYz's Avatar


      • Joined: Feb '03
      • Posts: 831
      Yeah, but you have to have a Linux server to run the PHP script... ;)

      ------------------
      Closed for study. HAHA, last year! Then, off I go to work... Not anymore, hell yeah, I design buildings now. And Malls. biggrin
      ------------------
      http://www.kromespot.net/gta/images/kabanner_gray.gif //my GTA cars
      http://www.kromespot.net/button.asp //my creations
      Post 7 | New
      Icey
      the pirate. arrr

      Icey's Avatar


      • Joined: Feb '03
      • Posts: 1,455
      • Type: Administrator
      You can run PHP on Windows!

      ------------------
      http://img150.imageshack.us/img150/7684/bronze6cy.jpg
      Post 8 | New
      ferret
      mustelid

      • Joined: Feb '03
      • Posts: 125
      Ick. Windows servers.  :N
      Post 9 | New
      Deleted Member
        Hey, don't bash Windows :D
        Post 10 | New
        GtAkReYz
        (^_^) /

        GtAkReYz's Avatar


        • Joined: Feb '03
        • Posts: 831
        ICEY On 24/02/2003 @ 12:07:33 wrote:
        You can run PHP on Windows!


          Are you sure about that? Cos I've been checking some servers to have a domain of my own and in some I have to choose wether I want Linux or Windows servers cos you can't run PHP on Windows nor ASP on Linux... ?:

        ------------------
        Closed for study. HAHA, last year! Then, off I go to work... Not anymore, hell yeah, I design buildings now. And Malls. biggrin
        ------------------
        http://www.kromespot.net/gta/images/kabanner_gray.gif //my GTA cars
        http://www.kromespot.net/button.asp //my creations
        Post 11 | New
        Deleted Member
          Linux can run ASP and Windows can run PHP.
          Post 12 | New
          Road Runner Canada
          Car Maker

          • Joined: Feb '03
          • Posts: 449
          ya you can have php on a windows server www.hostultra.com is a windows one (i love windows servers) no chmodding or is that just windows 2000 servers....?

          ------------------
          ReSpEkT :T -made by one and only me
          Post 13 | New
          GtAkReYz
          (^_^) /

          GtAkReYz's Avatar


          • Joined: Feb '03
          • Posts: 831
          Hey, one learns new stuff every day!

            Thanks, this will be very useful when I *truly* decide to get a decent server!

          ------------------
          Closed for study. HAHA, last year! Then, off I go to work... Not anymore, hell yeah, I design buildings now. And Malls. biggrin
          ------------------
          http://www.kromespot.net/gta/images/kabanner_gray.gif //my GTA cars
          http://www.kromespot.net/button.asp //my creations
          Post 14 | New
          Deleted Member
            A Linux/windows dualboot is very interesting. Try it out.
            Post 15 | New
            ferret
            mustelid

            • Joined: Feb '03
            • Posts: 125
            Also known as "resisting the temptation to delete the Windows partition on a daily basis", which is the stage I'm at now. :D
            Post 16 | New
            Road Runner Canada
            Car Maker

            • Joined: Feb '03
            • Posts: 449
            well umm ya windows *sucks* but i use it because of the fact that i can't figure out linux ... well i haven't really tried but i don't want to fuck up my computer again.

            ------------------
            ReSpEkT :T -made by one and only me
            Post 17 | New
            ferret
            mustelid

            • Joined: Feb '03
            • Posts: 125
            Hehehe... don't really blame you. My neighbour managed to screw his up yesterday. He had, and I swear this is what it said...

            "Error: missing attribute '_pickle'"

            :D
            Post 18 | New
            Road Runner Canada
            Car Maker

            • Joined: Feb '03
            • Posts: 449
            hmm you know what this forum needs a webediting part ... about cgi/php/ site problems and stuff sorta like a resource for us developing gta fans hmmm .... god idea icey?

            ------------------
            ReSpEkT :T -made by one and only me
            Post 19 | New
            Icey
            the pirate. arrr

            Icey's Avatar


            • Joined: Feb '03
            • Posts: 1,455
            • Type: Administrator
            Well if its its help for making a GTA site post it in the GTA help section! :D

            ------------------
            http://img150.imageshack.us/img150/7684/bronze6cy.jpg
            Post 20 | New
            Road Runner Canada
            Car Maker

            • Joined: Feb '03
            • Posts: 449
            well i guess but then that would make it so much more convienient lol o well

            ------------------
            ReSpEkT :T -made by one and only me
            Page: 1, 2
            Printable Version Abbreviations
            IceyBoard 1.6.2 © 2002-12 Icey