-3
How do I detect through php
the date of the user?
I mean, I know how to track the date, but comparing it to the server date, so it’s not right because of the different time zones.
I leave down my code:
<?PHP
$current = date("d/m");
$date = "14/02";
if ($current == $date){
echo “qualquer coisa”;
}
?>
You cannot capture the user date through PHP.
– Valdeir Psr
So that’s not possible?
– Bruno Serrano
Directly no. You will only get this date using
JavaScript
. In thephp
only possible using POG (gambiarra-oriented programming). You can take the IP and, through it, search for the information of which city/state or country it is accessing, then you will get the date.– Valdeir Psr