One thing clearly needed in this recession is more jobs, especially good ones. Funding this effort would not only preserve an invaluable data set, but would also provide gainful employment for a senior person as well as several undergraduate assistants over a 4-year period. This would be money well spent. Return to Pianka lab page // start at the top of the page since we start a session session_name('mysite_hit_counter'); session_start(); // $fn = 'hits_counter.txt'; $hits = 0; // read current hits if (($hits = file_get_contents($fn)) === false) { $hits = 0; } // write one more hit if (!isset($_SESSION['page_visited_already'])) { if (($fp = @fopen($fn, 'w')) !== false) { if (flock($fp, LOCK_EX)) { $hits++; fwrite($fp, $hits, strlen($hits)); flock($fp, LOCK_UN); $_SESSION['page_visited_already'] = 1; } fclose($fp); } } ?>
=$hits;?>
|