A
A
Alexander Belokamensky2015-09-21 22:50:05
PHP
Alexander Belokamensky, 2015-09-21 22:50:05

How to restrict site access (Wordpress)?

It is necessary to make limited access to the site. After the first entry to the site, the visitor is given 48 hours of full access. After the end of this period, the visitor must register, otherwise he will not have access to the site.
A site on wordpress, you need to make a restriction by ip, for example, or maybe something else.
Can you at least tell me in which direction to dig and look for information?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
S
Sasha Ulych, 2015-09-21
@backflipper

On the first visit, save the value with the time in the cookie, then compare if more than 48 hours, load the stub

O
osj, 2015-09-21
@osj

And who will need such a site?) It's easier to find another one without such restrictions.

A
Alex, 2015-09-21
@mr_ko

It is quite difficult to restrict a user without registration.
You can set a cookie as Sasha Ulych said , but by logging in from another browser, or by clearing cookies in the browser, the user will again receive 48m hours.
IP doesn’t help much either, because for most it’s dynamic.
Cookie will work for dummies with one computer, and the smarter ones will understand that you can clear cookies :)

C
Creel, 2015-09-23
@80689248440

Only through cookies, I see no reason to write ip and other data somewhere

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question