On Login: if(isset($_POST[‘remember’])) { $month = time() + ( ( 3600 * 24 ) * 30 ); setcookie(‘remember_me’, $user_id, $month); } else { $past = time() – 100; setcookie(‘remember_me’, ”, $past); } On Logout: $past = time() – 100; setcookie(‘remember_me’, ”, $past); if( isset($_COOKIE[‘remember_me’]) AND trim($_COOKIE[‘remember_me’] ) != “” ) { //Store the sessions which […]
<?phpnamespace App\Http;class HttpCode{/** HTTP Status Codes & their meaning* Source: https://en.wikipedia.org/wiki/List_of_HTTP_status_codes* By: Yentel Hollebeke – https://github.com/yentel* TODO: add remaining comments with code descriptions*//** Informational codes (1xx)*//*** 100 – Continue* The server has received the request headers and the client should proceed to send the request body* (in the case of a request for which a body needs […]
$date_a = new DateTime(‘2010-10-20 08:10:00’); $date_b = new DateTime(‘2008-12-13 10:42:00’); $interval = date_diff($date_a,$date_b); echo $interval->format(‘%h:%i:%s’);