|
|
|
 |
Wissen ist Machtnix wissen macht auch nix |
 |
only 1h Day
800XE 1.5.2008 19:07
Zugrifflimit Script
$thisDay=date('Ymd'); $lastDay=file_get_contents('thisDay.txt'); if ( strcmp($thisDay,$lastDay) ) { $handle=fopen('thisDay.txt','wb'); fwrite($handle,$thisDay); fclose($handle); unlink('thisDayIP.txt'); } else { $ts=time(); $ip=$_SERVER['REMOTE_ADDR']; $ipLog=' '.file_get_contents('thisDayIP.txt'); if ( $pos=strpos($ipLog,'»'.$ip.'»') ) { $ipLog=str_replace('»'.$ip.'»','',$ipLog); $comin=(int)substr($ipLog,$pos,23); if ( $comin < $ts-(60*60) ) { echo('ERROR .... Acces only 1h per Day'); exit(); } } else { $handle=fopen('thisDayIP.txt','ab'); fwrite($handle,'»'.$ip.'»'.$ts); fclose($handle); } }
echo( ' Welcome on my Website ' );
Beitrag kommentieren:
|
|
Gast ····
···· Bookmark @
|