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?
External image (may be gone) http://WapTops.com- Get Real High Traffic http://WapFun.info-Fun 4 Wap
Started on the old forum in February 2012 · view the original in the archive · old links redirect here
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?
External image (may be gone) http://WapTops.com- Get Real High Traffic http://WapFun.info-Fun 4 Wap
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
i0nutzxp wrote: 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
External image (may be gone) http://WapTops.com- Get Real High Traffic http://WapFun.info-Fun 4 Wap
if(date('G')>12) echo "link1"; else echo "link2";
now i got the right coe
<?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>';
?>
External image (may be gone) http://WapTops.com- Get Real High Traffic http://WapFun.info-Fun 4 Wap