note 89660 added to function.flock
| From: | bazaiq dot pl at osu1 dot php dot net | Date: | Wed, 18 Mar 2009 13:05:25 +0000 |
| Subject: | note 89660 added to function.flock | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-152086@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/89660
Del: integrated -- https://master.php.net/note/delete/89660/integrated
Del: useless -- https://master.php.net/note/delete/89660/useless
Del: bad code -- https://master.php.net/note/delete/89660/bad+code
Del: spam -- https://master.php.net/note/delete/89660/spam
Del: non-english -- https://master.php.net/note/delete/89660/non-english
Del: in docs -- https://master.php.net/note/delete/89660/in+docs
Del: other reasons-- https://master.php.net/note/delete/89660
Reject -- https://master.php.net/note/reject/89660
Search -- https://master.php.net/manage/user-notes.php