Jump to content

Detect fast increase in a database


MadnessRed

Recommended Posts

I have a database that counts a level. I want a script that will notify me if someone's level goes up by greater than a certain amount of an hour. So if for example if there level went up 500 in 1 hour it would make a note of something like

 

15:00 level 27

16:00 level 527

 

then I could see, ah, this person is cheating.

 

Is that possible?

 

---

 

or if that is not possible then a simple 1 would have say

Two rows

 

Level

Levelpr

 

Then at at midnight (or another time) we have something like

 

if ($level - $levelpr > 100)

$cheaters = 'cheaters.txt';

 

 

$fwrite = "$name Went from $levelpr to $level in 24 hours<br />/n<br />/n";

 

 

$handle = fopen($cheaters, 'a');

 

fwrite($handle, $fwrite);

 

 

--

 

I woudl be very greatful for any help.

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/113079-detect-fast-increase-in-a-database/
Share on other sites

Archived

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

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