Jump to content

Free GeopIP location script/addon


Recommended Posts

This mod/addon is simple.

 

It simply shows the location of the user visiting your website.

 

This isn't really for fraud protection and it doesn't store any info but I do use it on my main page and on my checkout page to discourage people that want to steal my services.

 

When they see you can tell where they are located or close to it they tend to leave. I also use apache mod-defensible that can prevent access if they are listed on any proxy/tor rbl.

 

Those 2 things have reduced my fraud signups to 0% now.

 

The info is pulled via API from ipinfodb.com so there is no database to install. It's just 1 file and the include line above and it uses country flags which is include.

 

To install it read the readme.txt file in the zip.

 

Download link

 

Problems ? Post here.

Link to comment
Share on other sites

  • 7 months later...

Well this was easier to fix then I thought so here it is.

 

To install this addon....

 

1) Register at http://www.ipinfodb.com to get your API key.

2) Add the following line to your configuration.php file

$geoip_key = "YOUR-API-KEY";

 

3) Upload the files in the correct directory structure.

 

/ROOTPATH_FOR_WHMCS/geoip.php

/ROOTPATH_FOR_WHMCS/flags/

/ROOTPATH_FOR_WHMCS/modules/ip-to-country_flag/noflag.png

 

4) Place the tag:

<!-- BEGIN geoip -->
{include_php file="geoip.php"}
<!-- END geoip -->

 

In any template file in the location you want it. There is no pre/post formating so

if you want to <center> it or use <p> you will need to add that. EG:

<!-- BEGIN geoip -->
<p></p>
<p>{include_php file="geoip.php"}</p>
<!-- END geoip -->

 

The images aren't encode of course but the geoip.php is.

 

If you have any problems post in this forum thread.

 

Download link

Link to comment
Share on other sites

  • 3 weeks later...
  • 4 months later...

Not sure where your last reply went to but I still need to have your website url.

 

Another thing you might want to check is your firewwall and see if you got blocked or if they blocked you.

 

The info is built from this URL, you need check it manually from your server to see if you get any info reply.

 

http://api.ipinfodb.com/v2/ip_query.php?key=".urlencode($geoip_key)."&ip=$ip&output=xml&timezone=false

Link to comment
Share on other sites

  • 1 month later...

Scott

 

wondering if i can pick your brains again on this module...

 

we have just recently in the last few days started seeing smarty errors from the geoip.php file such as

 

Fatal error: Uncaught exception 'Exception' with message 'String could not be parsed as XML' in /home/cliflu/public_html/geoip.php:15 Stack trace: #0 /home/cliflu/public_html/geoip.php(15): SimpleXMLElement->__construct() #1 /home/cliflu/public_html/geoip.php(33): locateIp() #2 /home/cliflu/public_html/includes/smarty/Smarty.class.php(1925): include('/home/cliflu/pu...') #3 /home/cliflu/public_html/includes/smarty/internals/core.smarty_include_php.php(40): Smarty->_include('geoip.php', false, Array) #4 /home/cliflu/whmcs_data/templates_c/%%D9^D91^D914B13A%%footer.tpl.php(198): smarty_core_smarty_include_php(Array, Object(Smarty)) #5 /home/cliflu/public_html/includes/smarty/Smarty.class.php(1265): include('/home/cliflu/wh...') #6 /home/cliflu/public_html/includes/clientareafunctions.php(0): Smarty->fetch() #7 /home/cliflu/public_html/networkissues.php(0): outputClientArea() #8 {main} thrown in /home/cliflu/public_html/geoip.php on line 15

 

any ideas what would be causing this?

Link to comment
Share on other sites

Scott thanks for the update on it... i have full error reporting on so its crashing the load of the client area as well as loggging it

 

is there a way to put a timeout or somethign in it so that if a response doesnt come thru it bypasses it?

Link to comment
Share on other sites

  • 4 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated