How can you take the SERVER time and not the machine time of the user?
Time() use the time of the machine... what is the function to have the time of the server?
Printable View
How can you take the SERVER time and not the machine time of the user?
Time() use the time of the machine... what is the function to have the time of the server?
huh? time() is from the server
in order to get the time of the user you have to take in account of the users time offset to the GMT. easier to say is you have to know where the user lives.
[PHP] $now = time()
$servertime = date("Y-m-d h:i:s A",$now);
echo($servertime);
PHP]
Parse error: parse error, unexpected T_VARIABLE in c:\program files\easyphp\www\droit.php on line 76
Why?
you forgot a semicolon after time()