Jump to content

Get a visitors state via IP


twofivethreetwo

Recommended Posts

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

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.