Home > Paid Traffic Sources > POP / PPV / Redirect

Slow Geoscript (14)


08-12-2011 09:54 PM #1 thefalcon (Member)
Slow Geoscript

I have a lander that uses the following script:
<script language="JavaScript" src="http://j.maxmind.com/app/geoip.js"></script><script language="JavaScript">document.write(geoip_city()) ;</script>

which just outputs the user's city. I am having a problem where the page take too long to load and the status bar says "waiting for j.maxmind.com"

I need a server side solution or something faster. Anyone have recommendation?


08-12-2011 10:47 PM #2 pinniped (Member)

Maxmind has the self hosted version.. http://www.maxmind.com/app/geolitecity


08-13-2011 02:47 PM #3 bbrock32 (Administrator)

Install GeoIP php extension so you can call out user's city directly from PHP.

Also much faster than the JS version.


08-13-2011 03:54 PM #4 parthenon (Member)

This.

MUCH faster and is as reliable as your server.


08-14-2011 04:11 PM #5 leber026 (Member)

Any one got a good set of instructions for this? I have mod_geoip up and running, I can pull out the country data but not the city data. I tried changing the db's but I didn't have much luck. I'm on a vps with centos 5.6 running apache 2.2 and php 5.2.14.

I know I'm close but missing something simple, so any advice would be great.

Thanks!


08-14-2011 04:58 PM #6 hd2010 (Member)

what you mean changing db, might be permssion issue, get your hosting provider to resolve for ya


08-16-2011 01:02 AM #7 leber026 (Member)

By Changing db I mean changing the db that mod_geoip is using to geoip_city_lite. I believe it uses the db that contains the country info by default.


08-16-2011 01:53 AM #8 hd2010 (Member)

@leber026 : according to the site, mod_geoip only display country info, if you want to use geoip_city_lite

here is an old site :
http://www.dinke.net/blog/en/2006/11...tion-to-geoip/


08-16-2011 04:06 PM #9 leber026 (Member)

Right, thats my problem. mod_geoip defaults to using the country only db. I swapped out the db to geoip_city_lite but still couldn't get mod_geoip to pull the city data. I'm not really sure what else to change to get the city info. (Guessing I might have to recomplie mod_geoip, but thats above my current skill set unless I get some good directions) I had it running on an old server with out much issue, some reason this vps is giving me problems.


08-16-2011 05:42 PM #10 hd2010 (Member)

If not mistaken mod_geoip not support city info


08-16-2011 07:32 PM #11 hd2010 (Member)

Here is my script for the geoip city, it point to the city db, just change the necessary paths...no compilation needed.


08-17-2011 01:34 AM #12 leber026 (Member)

Thanks, but do you mind posting that again, looks like it was and invite url? I keep getting and error saying someone else already accepted the invite.


08-17-2011 02:13 AM #13 hd2010 (Member)

Quote Originally Posted by leber026 View Post
Thanks, but do you mind posting that again, looks like it was and invite url? I keep getting and error saying someone else already accepted the invite.
Here the new link :

http://www.screencast.com/t/oKOxoMcYEZ4


08-17-2011 11:35 PM #14 chase (Member)

http://ctrtard.com/code/blazing-geo-...n-your-server/


Home > Paid Traffic Sources > POP / PPV / Redirect