I know that sessions are preferred over cookies for security reasons but I was wondering how to make a session that has an expire date like cookie , I know that session only last until the browser closes but what if I want to make a (Keep me logged in) feature in my system or website without using cookies because hackers might play with it on contrast with sessions that have an ID that no one know it and it is stored on server ? or do i just use cookies and find another way to secure my system which is not easy.
I searched stackoverflow for an answer but couldn't find appropriate one.
i need an explanation, thanks in advance.