Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » MetaMod
- » MetaMod General Support
- » Using GeoLite City - Not Locating...
Using GeoLite City - Not Locating California?
Using GeoLite City - Not Locating California?
Hi, seems I'm not doing something incorrect. I have two modules; "California" module (ID 41), and an "Everyone Else" module (ID 40).
I'm using this to show one phone number in California, and if not in California show another phone number everywhere else. The code I have in MetaMod is:
Code:
if ( $geoip->region == "CA" ) return 41;
return 40;
If someone views the site in California though they don't see module 41 like they should, they see module 40 instead. If however, to test, I changed the "CA" to "TX" then people in Texas correctly see module 41, I've also tried other states such as "ID" and it worked correctly as well.
Is "CA" the correct code for California, or is my overall code not correct?
Thank you.
Re: Using GeoLite City - Not Locating California?
Hi hominid4,
I'd say that this is completely dependent on the accuracy of the GeoLiteCity database. If it works for some IP addresses and not others, then the MetaMod portion of this is working ok, at least.
Can I suggest that you get someone from northern California to give you their IP address (e.g. http://whatismyipaddress.com/ ) then put this into the demo server at www.maxmind.com ? Bear in mind that the maxmind demo uses their commercial database which is a little more accurate than the free one - but I suspect that the IP address probably won't come up with the right info even with the commercial one. If it *does* come up with the right info on there, can you post the IP address and I'll test it on the free version to see the differences between the free and commercial databases.
(and of course, check that you have the most up to date version of the database)
Hope that helps,
Stephen
- Index
- » MetaMod
- » MetaMod General Support
- » Using GeoLite City - Not Locating...
Board Info
- Board Stats:
- Total Topics:
- 1689
- Total Polls:
- 6
- Total Posts:
- 5942
- Total Posts Today:
- 1
- User Info:
- Total Users:
- 7621
- Newest User:
- musser4585
- Members Online:
- 1
- Guests Online:
- 126
- Online:
- musser4585
Forum Legend:
Topic
New
Locked
Sticky
Active
New/Active
New/Locked
New Sticky
Locked/Active
Active/Sticky
Sticky/Locked
Sticky/Active/Locked