Exemple #1
0
 public function new_token()
 {
     $date_format = new date();
     $date = $date_format->format_strt("d-m-Y H:i:s");
     $username = $this->username;
     $password = $this->password;
     $chaine = "azertyuiopqsdfghjklmwxcvbnAZERTYUIOPQSDFGHJKLMWXCVBN&0123456789_@";
     $shuff = str_shuffle($chaine);
     $key = substr($shuff, 0, 15);
     $token = $username . "_" . $key . "_" . $password . "_" . time();
     return $token;
 }
Exemple #2
0
 public function month_strt()
 {
     $date_format = new date();
     $debut_mois = $date_format->format_strt(date("01-m-Y"));
     $fin_mois = $date_format->format_strt(date("31-m-Y"));
     return array("debut_mois" => $debut_mois, "fin_mois" => $fin_mois);
 }