Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $myFile = "logs.txt";
- $fh = fopen($myFile, 'a') or die("can't open file");
- $stringData = "Time: " . time() . " - I.P: " . $_SERVER['REMOTE_ADDR'] . " Host: " . gethostbyaddr($_SERVER['REMOTE_ADDR']) ."\n";
- fwrite($fh, $stringData);
- fclose($fh);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment