![]() |
|
IP Recorder Code, site - Printable Version +- Sinisterly (https://sinister.li) +-- Forum: Hacking (https://sinister.li/Forum-Hacking) +--- Forum: Tutorials (https://sinister.li/Forum-Tutorials) +--- Thread: IP Recorder Code, site (/Thread-IP-Recorder-Code-site) |
IP Recorder Code, site - SCARIO - 01-23-2020 Code: <?php
$ipaddres = $_SERVER["REMOTE_ADDR"];
$scannee= $_SERVER["HTTP_USER_AGENT"];
$ip= fopen("ip.txt", "a");
fwrite($ip,"name Chrome : $scanner<br> İp : $ipaddres");
?>Records the ip address. Put it in the index.php file. It saves at www.site.com/ip.txt RE: IP Recorder Code, site - mothered - 01-24-2020 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. RE: IP Recorder Code, site - hacxx - 01-24-2020 Thanks very helpful. I normally use Statcounter as it show all type of information with a hidden JavaScript snip. RE: IP Recorder Code, site - SCARIO - 01-25-2020 (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. (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);
?>RE: IP Recorder Code, site - mothered - 01-25-2020 (01-25-2020, 09:32 AM)SCARIO Wrote:(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. Good use of functions, and the variables have been named accordingly. Usually when I come across scripts, some editing Is required. Not In this case. Thanks again. RE: IP Recorder Code, site - hacxx - 01-25-2020 I know. That's the main reason why i just code in client side. RE: IP Recorder Code, site - Stringer - 02-04-2020 Whahahhaha. Wtf was that video man. |