RE: IP Recorder Code, site 01-25-2020, 09:32 AM
#4
(01-24-2020, 02:52 AM)mothered Wrote: The majority of my sites are configured to save visitor's IP addresses, but those that don't, I'll look Into this script.
Thanks.
(01-24-2020, 03:34 PM)hacxx Wrote: Thanks very helpful. I normally use Statcounter as it show all type of information with a hidden JavaScript snip.
This code. It sees your work.
Code:
<?php
$protocol = $_SERVER['SERVER_PROTOCOL'];
$ip = $_SERVER['REMOTE_ADDR'];
$port = $_SERVER['REMOTE_PORT'];
$agent = $_SERVER['HTTP_USER_AGENT'];
$ref = $_SERVER['HTTP_REFERER'];
$hostname = gethostbyaddr($_SERVER['REMOTE_ADDR']);
$fh = fopen('ip.txt', 'a');
fwrite($fh, 'IP Address: '."".$ip ."\n");
fwrite($fh, 'Hostname: '."".$hostname ."\n");
fwrite($fh, 'Port Number: '."".$port ."\n");
fwrite($fh, 'User Agent: '."".$agent ."\n");
fwrite($fh, 'HTTP Referer: '."".$ref ."\n\n");
fclose($fh);
?>
we obey a god that does not exist.
SCARIO
SCARIO



![[+]](https://sinister.li/images/modern/collapse_collapsed.png)