One thing that has been nagging me for a very long time is PHP’s session option to use alternative methods of transporting the session id from client to server.
Normally when I check for cookies, it is done via JavaScript and the most common Server Side way is using a redirect to set and then check for a cookie.
But since PHP has the option to use alternative transportation like GET and POST, it means that PHP needs a way of checking if cookies can be used on the client or not.
The Question:
How does PHP check if cookies is enabled?
Is it just a redirect set and check?
And by redirect I mean send a Set-Cookie header, reload and check if it is set.