V
V
votod2015-09-20 21:56:27
PHP
votod, 2015-09-20 21:56:27

How to block access to a site by hostname?

How to block access to a site by hostname? For example, if the hostname of the ip address contains the word "tor", how can you block access to the site for such a host via php ?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dokuro-chan, 2015-09-20
Chan @iDokuro

if (strpos($_SERVER['REMOTE_HOST'], 'tor'))
{
     // Блочим
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question