Alain: Probleme mit flock

Beitrag lesen

Moin, ich habe hier ein beispiel aus einem script das funtzt,es handelt sich aber um ein dbfile:

$doflocks = 1; print "Content-type: text/html\n\n"; $maxsize=$maxusers82; #uname+pass average length is 8 chars unlink($loginlog) if ((stat($loginlog))[7] > $maxsize);

if (dbmopen(logins,$loginlog,0666)) {         flock(logins,2) if ($doflocks);         ($ip_last,$count_last,$date_last) = split(/*/,$logins{$username});

#if first time logging in today         if ($date_last ne $date_today)         {                 $count_last=0;         }         elsif (($ip_last ne $ip_now) and ($agent ne /AOL/))         { blablabla   }

$logins{$username} = "$ip_now*$count_last*$date_today";         dbmclose(logins);         flock(logins,8) if ($doflocks);

......blabla

Grüsse vom Alain

--
...nobody is perfect I am nobody