dachshund Posted May 2, 2010 Share Posted May 2, 2010 i know there's probably not a solution as simple as this but, if possible, i would like to create some location specific php by finding the users ip address something that would work like this if (users_location == 'UK') { echo 'This'; }else { echo 'That'; } let me know if this is way to difficult! thanks Quote Link to comment https://forums.phpfreaks.com/topic/200461-location-specific/ Share on other sites More sharing options...
Alex Posted May 2, 2010 Share Posted May 2, 2010 You can do this easily using the geoip extension if you have it installed. Quote Link to comment https://forums.phpfreaks.com/topic/200461-location-specific/#findComment-1051957 Share on other sites More sharing options...
dachshund Posted May 2, 2010 Author Share Posted May 2, 2010 how can i install that? sorry quite new to this – i did read installation but it didn't make much sense to me i have hosting with 1and1, unfortunately. not sure if that changes anything Quote Link to comment https://forums.phpfreaks.com/topic/200461-location-specific/#findComment-1051958 Share on other sites More sharing options...
Alex Posted May 2, 2010 Share Posted May 2, 2010 You can check to see if you already have it installed by using: echo phpinfo(); If you don't have it installed, and you're on shared hosting you won't be able to install it. In that case you can use an API like this one. Quote Link to comment https://forums.phpfreaks.com/topic/200461-location-specific/#findComment-1051961 Share on other sites More sharing options...
teamatomic Posted May 5, 2010 Share Posted May 5, 2010 Using an API is usually going to be slow. Its better to get the files and use them locally. http://www.phpfreaks.com/forums/index.php/topic,291710.msg1382042.html#msg1382042 HTH Teamatomic Quote Link to comment https://forums.phpfreaks.com/topic/200461-location-specific/#findComment-1053373 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.