Posted By

robnilas on 01/21/17


Tagged

redirect php-redirect


Versions (?)

PHP Redirect in exact time - v2


 / Published in: PHP
 

  1. <?php
  2. //March 21, 2014 at 18:20 GMT
  3. date_default_timezone_set('GMT');
  4. $target = strtotime("March 21, 2014, 18:20");
  5. $date = strtotime(date("F j, Y, g:i a"));
  6. $page = ($date>=$target ? "page2.html" : "page1.html");
  7. include($page);
  8. ?>

Report this snippet  

You need to login to post a comment.