Jump to content

Php server timing and Reset Cookies


FarrukhMalik

Recommended Posts

I have a ptc site in php
I want that all my ads will refresh at midnight in Pakistani time but server based in USA
please let me know how it will happen
I have a file name titulos.php

and this is code please help me thanks.

<tr>
<td bgcolor="<?=$highlight?>">


<?
require('config.php');
$sqle = "SELECT * FROM tb_ads WHERE user='$last' and ident='$id'";
$resulte = mysql_query($sqle); 
$myrow = mysql_fetch_array($resulte);
mysql_close($con);


$time=$myrow['visitime'];

$crok1 = date(time());
$crok2 = date($time + (24 * 60 * 60));



if($crok1 >= $crok2)



?><?=$bold?><a href="view.php?ad=<?=$id?>" target="_blank"><?=$description?></a><?=$boldc?><?



} else { ?><del><?=$description?><del><? }


?>


</td>
<tD bgcolor="<?=$highlight?>">
<?=$members?> 

</td>
<td bgcolor="<?=$highlight?>">

<?=$outside?>

</td>
<td bgcolor="<?=$highlight?>">

<?=$total?>

</td>
</tr>

Link to comment
https://forums.phpfreaks.com/topic/292673-php-server-timing-and-reset-cookies/
Share on other sites

you can set the default timezone for your country like this replacing Country with your country, but check out this link because i couldn't find Pakistan on the list so you will need to find the closest to you that will fit your needs.

 

http://php.net/manual/en/timezones.php

<?php
    date_default_timezone_set("Country");
    echo date('d-m-Y H:i:s'); //Returns IST 
?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.