PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Hi, i have this counter script but what i want it to do is increment by 10 each day i dont want to count my vistors i just want a script that will display a number and each day it adds 10 to that number!
am i anywhere near with this piece of code? if not can someone point me in the right direction!
A cron job is complete overkill for something like this. What Vladsun suggested, "Just define a start date, calculate the days difference between it and the current date and multiply by 10", is the right approach.
onion2k wrote:A cron job is complete overkill for something like this. What Vladsun suggested, "Just define a start date, calculate the days difference between it and the current date and multiply by 10", is the right approach.
How would the script run though?
My understanding is that the script will not be manually invoked. Is this right djcritch?
aceconcepts wrote:So, you could use this method to run a script at anytime? Because djcritch needs the script to execute at midnight everyday.
I don't think he does. I think that was him thinking of a way to increment the counter by 10 each day. He needs "a script that will display a number and each day it adds 10 to that number!" ... the code I posted does that.