need a toplist script in which stats will be of last 24hours...???

Started on the old forum in December 2010 · view the original in the archive · old links redirect here

4 replies · 384 views · started 15 years ago · 1 min read

3 participants
antony2kx Developer · 94 posts #3

Simple to do man

store all the stats incoming/outgoing with the current time, so basically you

call everything from the database that has a time greater than or equal to 24 hours ago.

$time = time();

$ago = $time - (60 * 60) * 24;

$get = mysql_query("SELECT * FROM `statstable` WHERE requestTime >='".$ago."'");

while($stats=mysql_fetch_object($get))
{
  echo $stat->incomeclicks;
//etc
}
something else Fellow · 2,296 posts #5

slowy wrote: m trying to add the time of in/out hits but its not working see dis

$date=Date("H:i:s");
 $insert=mysql_query("INSERT INTO in_out SET ip='".$_SERVER['REMOTE_ADDR']."', sid='".$_POST["sid"]."', time='".$date."');

your missing a " at the end ");

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close