Welcome to the MetaMod and Chameleon Support Forums.

Before posting, please check out the FAQs.

helpme

 

Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.

 

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.

hominid4
Beginner Modder
ranks
useravatar
Offline
13 Posts
Administrator has disabled public posting

Re: Using GeoLite City - Not Locating California?

Hi, an update on this.  What seems to be happening is that "CA" is working correctly in southern California but not northern California, is there something I need to do to cover the whole state?

Thanks!

hominid4
Beginner Modder
ranks
useravatar
Offline
13 Posts
Administrator has disabled public posting

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

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3314 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1691
Total Polls:
6
Total Posts:
5912
Total Posts Today:
6
User Info:
 
Total Users:
11529
Newest User:
jame380003
Members Online:
1
Guests Online:
197

Online: 
jame380003

Forum Legend:

 Topic
 New
 Locked
 Sticky
 Active
 New/Active
 New/Locked
 New Sticky
 Locked/Active
 Active/Sticky
 Sticky/Locked
 Sticky/Active/Locked