sgrayban Posted April 9, 2010 Share Posted April 9, 2010 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. 0 Quote Link to comment Share on other sites More sharing options...
GNS_Harrison Posted April 9, 2010 Share Posted April 9, 2010 ah thanks thats cool going to try it out 0 Quote Link to comment Share on other sites More sharing options...
sgrayban Posted November 24, 2010 Author Share Posted November 24, 2010 The API code has changed for this mod. I will have a new download next week. You will have to register at ipinfodb.com to get a api key which you will need to enter into a file to gain API access. 0 Quote Link to comment Share on other sites More sharing options...
sgrayban Posted November 24, 2010 Author Share Posted November 24, 2010 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 0 Quote Link to comment Share on other sites More sharing options...
Snowman Posted December 14, 2010 Share Posted December 14, 2010 Scott, a great handy little mod... one thing id like however is to be able to split the long and lat into 2 seperate lines to fit in with the left column sizing we use anyway to do this? 0 Quote Link to comment Share on other sites More sharing options...
sgrayban Posted December 14, 2010 Author Share Posted December 14, 2010 I guess I could make that change... I'll post a separate file for that. 0 Quote Link to comment Share on other sites More sharing options...
sgrayban Posted December 14, 2010 Author Share Posted December 14, 2010 Is this what are asking for ?? https://www.borgnet.net/clients/geoip.php 0 Quote Link to comment Share on other sites More sharing options...
sgrayban Posted December 14, 2010 Author Share Posted December 14, 2010 Ok I changed the code so that long & lat is on its own line.. just download the new zip file. 0 Quote Link to comment Share on other sites More sharing options...
Snowman Posted December 15, 2010 Share Posted December 15, 2010 Scott thats great Thanks 0 Quote Link to comment Share on other sites More sharing options...
sgrayban Posted December 15, 2010 Author Share Posted December 15, 2010 no problem 0 Quote Link to comment Share on other sites More sharing options...
Snowman Posted April 19, 2011 Share Posted April 19, 2011 Scott I see IPinfoDB have changed their databases and im wondering if this mod will still work correctly Ive noticed its started returning no results for me in recent days... 0 Quote Link to comment Share on other sites More sharing options...
sgrayban Posted April 19, 2011 Author Share Posted April 19, 2011 It's working on my site still. Did you get the last update for it ? They changed how you get the data feed now, you have to signup with them and get a API key. 0 Quote Link to comment Share on other sites More sharing options...
Snowman Posted April 19, 2011 Share Posted April 19, 2011 Scott Yes i have the latest version and ive even redone the key just in case...s till no joy...was working for ages and has since stopped... but im not sure why? 0 Quote Link to comment Share on other sites More sharing options...
sgrayban Posted April 19, 2011 Author Share Posted April 19, 2011 site address? 0 Quote Link to comment Share on other sites More sharing options...
sgrayban Posted April 19, 2011 Author Share Posted April 19, 2011 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 0 Quote Link to comment Share on other sites More sharing options...
Snowman Posted April 26, 2011 Share Posted April 26, 2011 Scott I got it sorted thanks... seems there was a problem with the key... thansk for your tips and advice 0 Quote Link to comment Share on other sites More sharing options...
Snowman Posted May 31, 2011 Share Posted May 31, 2011 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? 0 Quote Link to comment Share on other sites More sharing options...
sgrayban Posted May 31, 2011 Author Share Posted May 31, 2011 Looks like the url wasn't available -- I haven't seen this personally yet. Is this being shown on the page or just the logs ? 0 Quote Link to comment Share on other sites More sharing options...
sgrayban Posted May 31, 2011 Author Share Posted May 31, 2011 I was just informed that ipinfodb.com has been having connection issues - this addon uses that company to provide the data. It isn't the addons fault in this case. 0 Quote Link to comment Share on other sites More sharing options...
Snowman Posted May 31, 2011 Share Posted May 31, 2011 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? 0 Quote Link to comment Share on other sites More sharing options...
sgrayban Posted May 31, 2011 Author Share Posted May 31, 2011 Ahh I figured it out, only took all day -- they changed the DB call again without emailing me thus the returned info either was wrong or it timed out. I will have a fix in a few minutes. 0 Quote Link to comment Share on other sites More sharing options...
sgrayban Posted May 31, 2011 Author Share Posted May 31, 2011 Ok I uploaded the new version -- to upgrade just over write the geoip.php file. 0 Quote Link to comment Share on other sites More sharing options...
sgrayban Posted June 1, 2011 Author Share Posted June 1, 2011 Oh and if there is no data returned it doesn't cut off the page anymore -- I had a return statement that I had forgot to remove, was only used for debugging on my end. 0 Quote Link to comment Share on other sites More sharing options...
ciwguru Posted October 17, 2011 Share Posted October 17, 2011 Hey Scott, Thanks for the script, it works great but I am not showing any timezone information, it shows everything but the last line. Can you tell me what I need to do to update it. Thanks 0 Quote Link to comment Share on other sites More sharing options...
sgrayban Posted October 17, 2011 Author Share Posted October 17, 2011 It works for me on my site --- What is your website url ? 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.