How to make that to the page on the website only some people could come?

Closed due to the fact that the question is too general for the participants freim , andreymal , 0xdb , Alexander Goncharov , Suvitruf May 22 at 5:31 .

Please correct the question so that it describes the specific problem with sufficient detail to determine the appropriate answer. Do not ask a few questions at once. See “How to ask a good question?” For clarification. If the question can be reformulated according to the rules set out in the certificate , edit it .

  • make registration) - Anton Kucenko
  • one
    By IP / Sessions / Cookies / HTP and many other options. Can you put the question more specifically? What do you need it for and what goals are you pursuing - Walfter
  • Clearly identify who "some people" are and write in the code of the site whether the incoming person is "some" or not. - andreymal
  • You can make a password request at the entrance to the site, no? - Skrillexazem
  • To access the site only from certain IP addresses - Alik 46

1 answer 1

<?php /** * @author admin * @copyright 2019 */ //список ип адресов $bd_ip = array( 'ip1', 'ip2' ); //текущий ип пользователя $ip = $_SERVER['REMOTE_ADDR']; //проверяем если ли ип в списке, если есть - выводим нужный контент if (in_array($ip, $bd_ip)) { echo 'нужный контент'; } ?>