Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
58 views
in Technique[技术] by (71.8m points)

Random change value in counter [PHP]

I wrote a time dependent counter. It's very low-level code. I need your help, namely:

My currently code:

<?php
$intTime = 1611667999 ;
echo "" . round ((time() - $intTime) / 4320,0) . " " ;
?>

I need your help for make it random. Currently counter is moving 20 times in 24 hours. 1 day = 86400sec. So the counter is moving up 1 time / 4320sec. How to add some randomness to it? I want 20-30 to be added randomly every day. Thanks!

question from:https://stackoverflow.com/questions/65902585/random-change-value-in-counter-php

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...