Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

age of a file? 1

Status
Not open for further replies.
Code:
<?

  $file = &quot;bla.jpg&quot;;
  $modified = filemtime($file);
  $current_time = time();
  if (($current_time - $modified) <= 60) { 
    $updated_in_the_last_minute = 1; } else {
    $updated_in_the_last_minute = 0; 
  }
?>

well this takes &quot;bla.jpg&quot; and checks if it was updated in the last 60 seconds... then u just need to echo the result or do what u want with it :p

haven't tested it but i think it works.

jamesp0tter,
jamespotter@netcabo.pt

p.s.: sorry for my (sometimes) bad english :p
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top