twofivethreetwo Posted August 7, 2008 Share Posted August 7, 2008 I have a client who wants to serve up text ads based on a persons state. Basically things like 'Free Shipping To $yourstate' type of thing. I know you can get the state from the IP address, but exactly how would I get that to a variable to use either in the ad or our ad manager? Any ideas? Link to comment https://forums.phpfreaks.com/topic/118548-get-a-visitors-state-via-ip/ Share on other sites More sharing options...
DarkWater Posted August 7, 2008 Share Posted August 7, 2008 Check out the GeoIP functions. Link to comment https://forums.phpfreaks.com/topic/118548-get-a-visitors-state-via-ip/#findComment-610332 Share on other sites More sharing options...
twofivethreetwo Posted August 7, 2008 Author Share Posted August 7, 2008 Are those available in php on most hosts? I doubt this client wants to pay for the extension for this as it is just something they would like to do, nothing major for them. Link to comment https://forums.phpfreaks.com/topic/118548-get-a-visitors-state-via-ip/#findComment-610338 Share on other sites More sharing options...
DarkWater Posted August 7, 2008 Share Posted August 7, 2008 The subset of functions that you will need are free if the GeoIP library is installed. But there are functions in the library that can require payment for access to the expanded databases or something. Never really looked into it. Just do a phpinfo(); and check if it's installed. Link to comment https://forums.phpfreaks.com/topic/118548-get-a-visitors-state-via-ip/#findComment-610346 Share on other sites More sharing options...
twofivethreetwo Posted August 7, 2008 Author Share Posted August 7, 2008 Alright, thanks for the info. I'll check phpinfo tomorrow when I get back to the office. Link to comment https://forums.phpfreaks.com/topic/118548-get-a-visitors-state-via-ip/#findComment-610349 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.