Jump to content


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


automatic reset every 12 hours

Recommended Posts

in my php made game. I'm having trouble on how it would automatically reset and refresh players stats every 12 hours. the reset file i made which codes are below. It only works when i manually run that script which is going to reset.php file. Can someone please help me out, , want it to reset from server time 0:00:00 and every 12 hours, it would refresh again automatically.

$a=mysql_query("SELECT id,name FROM members");
$msg="A New Day Has Come, You Have Been Awarded <b>500</b> Buds";
mysql_query("INSERT INTO news (who,message,date) VALUES ('$b[id]','$msg','".time()."')");
mysql_query("UPDATE members SET bank=bank+500");
mysql_query("UPDATE members SET daysplayed=daysplayed+1");
mysql_query("UPDATE clan SET age=age+1");
mysql_query("UPDATE members SET stamina=maxstamina");
mysql_query("UPDATE members SET powerball=maxpowerball");
mysql_query("UPDATE members SET life=maxlife");

- saizen

Share this post

Link to post
Share on other sites


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.