Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IP QUESTION

Status
Not open for further replies.

random2

ISP
Dec 4, 2003
1
US
Is there a simple java or perl or php code that is able to do the following:

Scenario: When users arrives at your website, it determines which of the 50 United States he's coming from, without asking via a form, and reroutes them to a specific web page designed for that state?

Example: I have 50 pages, a-z, each representing a state.
If you live in new york and visit the main site, the script would read that you are visiting from new york and automatically route you to a newyork.htm page as an example. Is this even possible by IP address?

Thank you.
 
The reason you can't do this is because sometimes the IP block isn't registered to where it really is.
Go to and in the NetGeo tool type in an IP and see where it resides.

For example:
I'm in new orleans, I had my server colod here at 67.128.62.1 (ts not there anymore)
When you enter that IP in Net Geo you get Denver, CO


VERSION=1.0

TARGET: 67.128.62.1
NAME: QWEST-BLKS-5
NUMBER: 67.128.0.0 - 67.129.255.255
CITY: DENVER
STATE: COLORADO
COUNTRY: US
LAT: 39.75
LONG: -104.99
LAT_LONG_GRAN: City
LAST_UPDATED: 12-Jul-2002
NIC: ARIN
LOOKUP_TYPE: Block Allocation
RATING:
DOMAIN_GUESS:
STATUS: OK


The only possibile way to do this would be if you were setting this up on a private network, and had control of the subnets (192.168.1.x would be AL 192.168.2.x would be CT etC)

My recomendation would be to have them enter in their zip code and redirect them that way.
 


Hi,

how about trying the AREA CODE of their phone numbers.


nemotek,
 
Not really no (which I like to view as a good thing).

You could simply have a map of your country and have them click their desired state, however.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top