help to show link on time basis...???

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    help to show link on time basis...???

    i have to show links on time basis. between 12a.m. to 2a.m. it should show abc.com and all othe time it should not show any link
    how to do it?

    http://WapTops.com- Get Real High Traffic
    http://WapFun.info-Fun 4 Wap

    #2
    PHP: date - Manual is more than enough for your problem.

    var_dump(date('G')); returns an int with 0-23 (range)
    13 - 23 => meaning 1 - 11 PM
    Last edited by i0nutzxp; 09.02.12, 12:44.
    <?php unlink('World/Europe/Romania.country'); ?>

    Comment


      #3
      Originally posted by i0nutzxp View Post
      PHP: date - Manual is more than enough for your problem.

      var_dump(date('G')); returns an int with 0-23 (range)
      13 - 23 => meaning 1 - 11 PM
      i m weak in coding.
      plz post the code

      http://WapTops.com- Get Real High Traffic
      http://WapFun.info-Fun 4 Wap

      Comment


        #4
        PHP Code:
        if(date('G')>12) echo "link1";
        else echo 
        "link2"

        Comment


          #5
          Originally posted by something else View Post
          PHP Code:
          if(date('G')>12) echo "link1";
          else echo 
          "link2"
          now i got the right coe

          Code:
          <?php
          date_default_timezone_set("Asia/Calcutta");
          $t=date("h.i");
          
          if($t>='00.00' and $t<'02.00')
          echo '<a href="http://abc1.com">abc</a>';
          ?>

          http://WapTops.com- Get Real High Traffic
          http://WapFun.info-Fun 4 Wap

          Comment

          Working...
          X