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
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 
?>
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.