0
Hello, for security reasons I need to pick the time the visitor of the page entered, but the system apparently is taking time from the server.
IP: [XXX.XXX.XXX.XXX] Date: [03-07-2017 - 14:05:49] (Local time 11:05)
I’m using the following code
$ip = $_SERVER['REMOTE_ADDR'];
$data = date("d-m-Y - H:i:s");
What I could use to catch the time of Brazil(Official time of Brasilia) ?
First you should understand that the methods shown are executed on the server, that is, it will return information from the server. For security issues you should really capture the server date yes, after all the destination is the same. I believe that the correct thing is to synchronize the server clock, until it is expected that the client-side time may not be the same with the other clients.
– Diego Vieira
What is this crazy security that depends on an arbitrary data easily falsifiable by the user?
– Oralista de Sistemas