I would like to get further explanation: when connecting to this website: https://www.iplocation.net/find-ip-address they are able to detect my device's info as well as my kind of OS. When connecting through mobile phone they do not give me the name of the browser even if I use Chrome. I want to get a PHP code which saves me in a txt file info concering the machine info like shown on that website.
Here is my script PHP and I want to edit correctly
<?php
$handle = fopen("log.txt", "a");
$ip = $_SERVER['REMOTE_ADDR'];
$user_agent = $_SERVER['HTTP_USER_AGENT'];
$rem_port = $_SERVER['REMOTE_PORT'];
$date=date ('l jS \of F Y h:i:s A');
$all = "IP: ".$ip."
UserAgent: ".$user_agent."
Port: ".$rem_port."
Date: ".$date."
";
fwrite($handle,$all);
fclose($handle);
header ('Location: https://link.net');
?>