Increase Any Number By 500 Once A Day

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!

Moderator: General Moderators

Post Reply
nanovation
Forum Newbie
Posts: 4
Joined: Sat Aug 18, 2007 12:27 pm
Location: Los Gatos, CA, USA

Increase Any Number By 500 Once A Day

Post by nanovation »

Does anyone know a quick and easy way to have a number increase 500 every day? For example, I would like for my tax liens website to say "Total new users: 156700" and have that number automatically increase 500 every day. Any help would be greatly appreciated :-)
Thanks in advance!
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

So fake the statistic?

Sure. Calculate how many days it has been from a certain date. Multiply by 500 and add your base value. Done.
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post by superdezign »

Hehe, nice job putting up the URL in the post where you claim to try to fake out your users.
nanovation
Forum Newbie
Posts: 4
Joined: Sat Aug 18, 2007 12:27 pm
Location: Los Gatos, CA, USA

Thanks Feyd

Post by nanovation »

Thanks Feyd. I'm pretty good at PHP coding, but I've never done something like this before. Can you maybe give me some PHP code snippets I could work with? That way, other visitors to this post will be able to use the code too. Thanks for the help :D
nanovation
Forum Newbie
Posts: 4
Joined: Sat Aug 18, 2007 12:27 pm
Location: Los Gatos, CA, USA

Just for the record

Post by nanovation »

And just for the record, my goal is not to fake the stats or mislead my users. I'm just trying to learn how to do something new.
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post by superdezign »

Gotcha.

Look at the date / time functions of PHP, date() in particular.
nanovation
Forum Newbie
Posts: 4
Joined: Sat Aug 18, 2007 12:27 pm
Location: Los Gatos, CA, USA

Thanks

Post by nanovation »

Thanks. Will do. If I come up with the code before anyone else, I'll post it here so others can cut and paste it.
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: Just for the record

Post by Benjamin »

nanovation wrote:And just for the record, my goal is not to fake the stats or mislead my users. I'm just trying to learn how to do something new.
lmao
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

I've seen a nice trick on thedailywtf... And it goes by creating a html page with 500 links to the same page.. Resulting in 500 requests...
Post Reply