basit bir kod ile ip log tutmak <?php $ip = $_SERVER['REMOTE_ADDR']; if ( !file_exists("ip.txt")) { touch("ip.txt"); $file = @fopen("ip.txt", "+r"); @fclose($file); } else {...

basit bir kod ile ip log tutmak

<?php
$ip = $_SERVER['REMOTE_ADDR'];
if ( !file_exists("ip.txt")) {
touch("ip.txt");
$file = @fopen("ip.txt", "+r");
@fclose($file);

} else {
$file = @fopen("ip.txt", "a");
$text = "-----------------------------". "\r\n" . "Tarih : " . date('d/m/Y - H:i') . "\r\n" . "IP Adresi :" . "\r\n" . $ip . "\r\n". "-----------------------------" . "\r\n";
@fwrite($file, $text);
@fclose($file);
}

?>
boş bir ip.txt hazırlayıp ftp'den chmod 777 veriyoruz. (yazma iznidir 777 komutu)
 
131,856Konular
3,272,064Mesajlar
316,401Kullanıcılar
roketatar399Son Üye
Üst Alt