php - I need assistance with my IP Logger -
i need ip logger.
at index.php file, use code:
----> $line = date('y-m-d h:i:s') . " - $_server[remote_addr]"; file_put_contents('cpanel/iphenter.log', $line . php_eol, file_append);
and in cpanel directory, have home.php file. in home.php file use following code implement .log file in div:
---> include 'iphenter.log' ;
at point, works. but, every ip mashes 'crashes' together(not sure how explain properly).
so, here question: how make ip go on own line. doesnt work in php code, how make 'press enter' after every log?
i hope understood issue. thanks!
$line = date('y-m-d h:i:s', strtotime("+2 hours")) . " - " . $_server['remote_addr']."<br \>";
is output generated html or text file? if text file, can try:
$line = date('y-m-d h:i:s' , strtotime("+2 hours") ) . " - " $_server['remote_addr']."\n";
Comments
Post a Comment