Backend Development

Log IP:s with PHP

Submitted by YokoLit, , Thread ID: 44745

Thread Closed
YokoLit
Novice
Level:
0
Reputation:
0
Posts:
22
Likes:
0
Credits:
1
20-08-2017, 05:01 PM
This post was last modified: 23-08-2017, 04:57 PM by YokoLit
#1
Code:
[code]$line = date('Y-m-d H:i:s') . " - $_SERVER[REMOTE_ADDR]";
file_put_contents('visitors.log', $line . PHP_EOL, FILE_APPEND);



Requirements

Webhost with php support.


How to add?
Add this between php codes, and it will log ips of people who visit your website.[/code]

Users browsing this thread: 3 Guest(s)