cruw Posted March 22, 2007 Share Posted March 22, 2007 Here's what I am trying to do... I want to create a simple header redirect in php that will redirect the end user to a certain URL when they click on it based on their country of origin. What is the best way to go about this? I tried looking through the code examples but couldn't find anything. Please help. Link to comment https://forums.phpfreaks.com/topic/43768-need-help-with-php-redirect-by-country/ Share on other sites More sharing options...
wilorichie Posted March 22, 2007 Share Posted March 22, 2007 First, you will need to find their IP using $HTTP_SERVER_VARS["REMOTE_ADDR"]; From there, you can determine where they are from via IP. To much effort, don't re-invent the wheel. Try and find something that does it already Link to comment https://forums.phpfreaks.com/topic/43768-need-help-with-php-redirect-by-country/#findComment-212500 Share on other sites More sharing options...
cruw Posted March 22, 2007 Author Share Posted March 22, 2007 yes..I have tried to find samples but I can't find any - anywhere. Any ideas? Thanks for the help btw Link to comment https://forums.phpfreaks.com/topic/43768-need-help-with-php-redirect-by-country/#findComment-212691 Share on other sites More sharing options...
mjlogan Posted March 22, 2007 Share Posted March 22, 2007 http://www.hotscripts.com/Detailed/35789.html http://www.phpclasses.org/browse/package/1477.html or something along those lines, and redirect to where ever depending on the results. Link to comment https://forums.phpfreaks.com/topic/43768-need-help-with-php-redirect-by-country/#findComment-212693 Share on other sites More sharing options...
cruw Posted March 22, 2007 Author Share Posted March 22, 2007 thank you!!! Link to comment https://forums.phpfreaks.com/topic/43768-need-help-with-php-redirect-by-country/#findComment-212694 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.