W
W
Web Kyb2016-07-22 12:23:06
PHP
Web Kyb, 2016-07-22 12:23:06

How to restrict the site to users, but leave it available for example for Samara?

It is necessary to prohibit viewing the site to Internet users from different cities and regions, but leave it available for Samara.
An example on YouTube Red
when entering the site, we are told that the site is not yet available for our country, but it is available
for America.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
Mikhail Osher, 2016-07-22
@miraage

Google "how to find out the city by IP".
However, whoever needs it will bypass it through vpn / tor.

S
Sanes, 2016-07-22
@Sanes

GeoIP. But be prepared for the fact that not all providers may have the correct location. This used to be the case with mobile devices.

Z
zvonok1337, 2016-07-22
@zvonok1337

GeoIP (there are a lot of classes for PHP), well, or we once did a city test of 100 questions, 5 questions for registration, which only a local could answer, but our city was small - 200,000 people.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question