T
T
tupoi_nub2016-05-21 11:18:19
PHP
tupoi_nub, 2016-05-21 11:18:19

How can the server determine the user's country?

The problem is that in a highly loaded project I used tabgeo, but loading the IP database by 2.5 meters each time is expensive, maybe there are some solutions on the side of the server itself, not PHP

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Melkij, 2016-05-21
@Melkij

nginx.org/en/docs/http/ngx_http_geoip_module.html
В приложении читать из $_SERVER.
В тегах apache указан - с ним отдельно посмотрите, есть ли особенности передачи заголовков от nginx'а или сразу заработает.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question