Answer the question
In order to leave comments, you need to log in
How to substitute a fake IP?
The situation is as follows, the site has content that depends on the country of the user, that is, for example, a person comes from Africa, then he is shown content relevant to his country. There are about three dozen different locations on the site with their own content, and it is necessary to test that each location displays its own content. VPN is not suitable here, because there are quite a lot of locations and it is difficult to maintain them in working condition + many countries are only paid.
Instead of a VPN, I found another way - this is a header substitution X-Forwarded-For
through an extension,
but the site still determines my real country.
Is it possible to somehow introduce myself to a site with a fake IP of another country (IP already exists)? Maybe an extension or other ideas?
Site in PHP. Determines location via Cloudflare$_SERVER["HTTP_CF_IPCOUNTRY"]
Answer the question
In order to leave comments, you need to log in
X-Forwarded-For is an HTTP header. The remote site can simply ignore it, using just REMOTE_ADDR or the standard "forwarded" header, since X-Forwarded-For is still not a standard at the moment.
Therefore, a VPN is the most reliable option.
Either way, or use remote_addr instead of header processing.
In general, write the functionality for changing the location in the admin panel and test by choosing a location from the menu.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question