Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 21st, 2012  |  syntax: PHP  |  size: 0.21 KB  |  hits: 18  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2.         $file = "protection_timestamp.txt";
  3.         $handle = fopen($file,"r+");
  4.         $timestamp = fread($handle,filesize($file));
  5.         if($timestamp < time())
  6.         {
  7.                 fwrite($handle,time());
  8.                 // Code
  9.         }
  10.         fclose($handle);
  11. ?>