Jump to content

Recommended Posts

Posted

Hey guys, I?m taking care of a website for a company that has locations in two general locations (The Philadelphia/NJ area and the DC/VA/MD area) I would like it so when the user clicks ?Sales & Events? they are directed to the sales & events at the location they are closest to (Either the Philly/NJ or the DC,VA,MD area) Is there any way to effectively do this or will I need to create some type of gateway page so they can choose their location? I?m sorry if this is not in the right part of the Forum but if this is possible, I don?t know what type of scripting would be used? Thanks for any and all help!

 

 

Jon

Posted

Assuming that you have a Geo-location Database available, PHP can be used to determine their location. At least the location of their ISP, which is not entirely trustworthy. I have a Forum which is 99% Canadian users, but the stats for that site show 85% US users, so if you use the available log information, you may be surprised by the results. Maybe the way to handle it would be to give the user the choice of which set of events they wish to view?

Posted (edited)

hmm So its really pretty complicated? I figured it wouldn't be that bad since i see advertisements all the time that obviously are aware of my location...whats up with that?

Edited by jpf566
Posted

Don't let me scare you too much... :P

It really depends on the database of ISP's and such. To get good data will cost you money to purchase and update the information which could change daily. I am not aware of a 'free' database of IP numbers to use.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...