I'm trying to secure a webpage to make it accessible by specific computers only. Though I'm sure there are many (and probably better) ways to to this, I wanted to do it using cookies. My idea was to write an if...else statement, in which you will be redirected to another page (let's say "blocked.html") if you do not have the required cookie. The information that is stored in the cookie is completely irrelevant; what matters is that the computer/browser has it.
For setting the cookie, I didn't have anything specific in mind. My idea was to just make another page with two buttons: one to set the cookie and one to erase it. I would take this page down after I set the cookie on the machines I wanted to specify.
Thanks in advance!