Our website requires page redirection based on the users IP.
The script must work in 2 steps.
(1) Determine where the user is from, and place it in a cookie.
note: hardcoding country IP ranges is fine, as long as it is editable in PHP.
(2) Using a MySQL table that indexes the pagenames, redirect users to the page most relevant to them based on their location.
eg table:
ID | PAGENAME | US | UK | AUS
1 | page1.php | page1.php | page1-1.php | page1-2.php
So the lookup in this case would be if we have an incoming user trying to access page1.php, and they're from Australia they are redirected to page1-2.php
If for example the user is from a country with no corresponding page then they are sent to the default page for all countries. Or if the page does not exist in the database then the user continues to the page designated.
Note this job does not require to fill out the MySQL database with real values, just writing the PHP code so that it works.
Candidates who have good English skills, especially if that is shown in your job offer will be highly regarded so we can discuss the problem together.
I've estimated this would be almost a full days work for an experienced programmer.