Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

PHP date question

Name: NWS 2007-06-18 2:40 ID:PlS1wRw+

Ok I can echo "Hello World!" but the problem is that after 30 minutes it should only echo "Hello you loser!"
How do I do this?

Name: Anonymous 2007-06-18 5:46 ID:6ubeVVOx


<?php
if (isset($_COOKIE['time'])) {
      print (time() > ($_COOKIE['time'] + 30 * 60))
                    ? "Hello you loser!" : "Hello World!";
}
else {
    setcookie('time', time());
    print "Hello World!";
}
?>

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List