Upload file if there are cookies

Does anyone know how to do this:
in the drive :there are, so to speak, the necessary cookies I created.
I go to /admin.phpand it opens if there are cookies needed.
How to do it? Have experience? Share or tell me what to read?

Thank you.

Answer 1

if (isset($_COOKIE['cookie_name'])&&$_COOKIE['cookie_name']=='value'){
  //Your code

Where cookie_name are your cookies on the C: drive, value is their contents. Depending on the security requirements, the code can become more complex.
Cookies are set by the set_cookie() function:
Retrieved from the $_COOKIE super-global array.