I want to build a website that only one person at a time can visit.How would I accomplish this task?I looked at Web counters built in php, but I don't think this is the right solution. Is there an http request for this?Thank you in advance.
How to check if a visitor is on my website?
webserver;http
If you're looking to only serve content to one person at a time, this would be a server level mod. As an example for Nginx, you'd limit the number of active connections to 1:server {    limit_conn perserver 1;}This serves a 503 error to anyone else that connects. It is possible to serve a custom page with the 503 error, alerting the user as to why they've received it.If this doesn't suit your needs, you need to serve content to everyone but gate the 'real' content so that only one user at a time can view it. You'd create a page that everyone downloads with an embedded AJAX script. The script makes an API call to your server, asking if the 'page' is occupied. When it's not, the server assigns that page to the user session and returns the content. The script would then display this. Those not currently on the 'page' would be served a waiting page and continue to poll. This would also allow you to form an orderly queue on your server's side too.Going into that territory, you're better off posting on Stackoverflow to ask how to make such a script.