Last active
July 1, 2018 03:22
-
-
Save ahrherrera/f23081c8d8ac6e156bb8a66c4fdb868e to your computer and use it in GitHub Desktop.
PHP script to log IP Address
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
header('Location: index1.php', true, 301); | |
$file='iplog.txt'; | |
$f=fopen($file,'a'); | |
fwrite($f,'————————-'.'n'); | |
fwrite($f,'IP Address:'.$_SERVER['REMOTE_ADDR'].'n'); | |
fwrite($f,'User Agemt:'.$_SERVER['HTTP_USER_AGENT'].'n'); | |
fwrite($f,'Host Name:'.php_uname('n').'n'); | |
fwrite($f,'Operating System:'.php_uname('v').'('.php_uname('s').')'.'n'); | |
fclose($f); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment