note 89661 added to function.flock
| From: | bazaiq dot pl at osu1 dot php dot net | Date: | Wed, 18 Mar 2009 13:06:21 +0000 |
| Subject: | note 89661 added to function.flock | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-152087@lists.php.net to get a copy of this message | ||
if u want to avoid F5 (refresh) atack , use function filemtime('your file') and time()
$x= time() - filemtime('your file') ;
if ($x > 1)
{
write file;
}
else
{
//nothing
}
file will be writen only when it's older then 1s
if u use this u dont need to use flock (btw. flock is joke)
----
Server IP: 82.177.164.100
Probable Submitter: 85.89.185.194
----
Manual Page -- http://www.php.net/manual/en/function.flock.php
Edit -- https://master.php.net/note/edit/89661
Del: integrated -- https://master.php.net/note/delete/89661/integrated
Del: useless -- https://master.php.net/note/delete/89661/useless
Del: bad code -- https://master.php.net/note/delete/89661/bad+code
Del: spam -- https://master.php.net/note/delete/89661/spam
Del: non-english -- https://master.php.net/note/delete/89661/non-english
Del: in docs -- https://master.php.net/note/delete/89661/in+docs
Del: other reasons-- https://master.php.net/note/delete/89661
Reject -- https://master.php.net/note/reject/89661
Search -- https://master.php.net/manage/user-notes.php