A
A
Aram Virabyan2017-08-22 13:50:20
PHP
Aram Virabyan, 2017-08-22 13:50:20

How to redirect users to different pages depending on their country?

Hello, help. We need a code (preferably in php) that would redirect users depending on their country.
For example, from the USA redirect to webusa.com, and from Russia to ruweb.ru

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sergey Goryachev, 2017-08-22
@webirus

With such requests on freelansim.ru

A
Andrey Shatokhin, 2017-08-22
@Sovigod

Why do you need a country? Do you need a language? Use the Accept-Language http header from the request. Immediately find out what language the user needs.

V
V Sh., 2017-08-22
@JuniorNoobie

Determine the IP on the server. Through some third-party service, you determine the country. You redirect the person where you need (and where you don’t need).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question