i found this script online:
<?php
$v_ip = $REMOTE_ADDR; $v_date = date("l d F H:i:s");
$fp = fopen("ips.txt", "a"); fputs($fp, "IP: $v_ip - DATE: $v_date\n\n"); fclose($fp);
?>
creating the entry works - however, the IP is not displayed. the entries created look like this:
IP: - DATE: Wednesday 09 March 03:36:15
IP: - DATE: Wednesday 09 March 03:36:41
what's the problem?
The variable is
$_SERVER['REMOTE_ADDR']
so you need to change yours to
$v_ip = $_SERVER['REMOTE_ADDR'];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With