Jump to content


- - - - -

[Unsupported] Geolocation mod with proxy detector


  • Please log in to reply
55 replies to this topic

#1 alrond

alrond

    Member

  • Members
  • PipPipPip
  • 20 posts
  • IPB Version:v2.1.x

Posted 16 November 2008 - 12:08 AM

Posted Image

File Name: [Unsupported]   Geolocation mod with proxy detector
File Submitter: alrond
File Submitted: 15 Nov 2008
File Updated: 15 Nov 2008
File Category: IP.Board v2.3.x & v2.2.x Mods

Displays the country and flag of user based on real geographical location. Proxy, VPN, TOR autodetector.

The main mod functions:
    * displays the country and flag of user. It is based on API and real geographical (and not invented) data of users;
    * Proxy-, VPN-, TOR autodetector, that helps against spam and hooliganism.

The flag can be displayed:
    * on the main page of the forum, in the "Board Statistics";
    * in the list "Online Users" (also determined for guests);
    * in the members profile;
    * in the list of all members;
    * in posts: in a profile and near the IP address (for moderators).

Features of the mod:
    * caching of API-requests for each session, that allows to reduce significantly the number of requests to the database;
    * API-requests for IP addresses of search bots will not be calculated;
    * mod works with IPB versions 2.1.x, 2.2.x, 2.3.x;
    * country in user's profile is defined by registration and in the future will not be changed, if a certain option is not chosen (so the country in the profile will be always actual);
    * for moderators the actual country will be recorded in each post, near the IP address;
    * the countries names are available in English, Russian, German and Spanish in encodings: UTF-8, ISO-8859-1, WINDOWS-1251, KOI8-R;
    * auto hide the posts written through a Proxy, TOR, Hosting and VPN (the feature can be changed in settings);
    * sorting of members by country.

Settings:
    * Choice between "Country code" and "Service code" (will be available later);
    * auto hiding of posts;
    * actualisation of the user's profile;
    * possibility to show the flag anywhere in the forum to certain groups.

A script is in mod available to determine the countries of already registered users and the previous posts.
The function "service code" (for proxy detector) will also be available later.

Screenshots:

On the main page of the forum list of countries with the number of online-users
Posted Image

Topics: in a profile and near the IP address (for moderators)
http://static.wipmania.com/img/mod/ipb/posts.png

On the main page of the forum w/o list of countries
http://static.wipmania.com/img/mod/ipb/boardstat.png

The list of all members
http://static.wipmania.com/img/mod/ipb/memberlist.png

The members profile
http://static.wipmania.com/img/mod/ipb/profile.png

Active member list
http://static.wipmania.com/img/mod/ipb/activemembers.png

Examples of forums with Geomod:
electrokilla.com with members today mod (see bottom)
kvnforall.info on main page just countries with numbers (see bottom)
silkroad-online.ru
b3club.ru

Click here to download this file

Edited by alrond, 16 November 2008 - 12:08 AM.


#2 Modslair

Modslair

    Novice

  • Members
  • PipPip
  • 8 posts
  • IPB Version:v3.1.x

Posted 16 November 2008 - 02:41 PM

Great modification.

It seems to be working well, though some users are not getting flags?

What would be the reason for this, it's currently set to country code. Would changing that setting be better to service code?

#3 alrond

alrond

    Member

  • Members
  • PipPipPip
  • 20 posts
  • IPB Version:v2.1.x

Posted 16 November 2008 - 08:25 PM

View PostModslair, on Nov 16 2008, 03:41 PM, said:

Great modification.

It seems to be working well, though some users are not getting flags?

What would be the reason for this, it's currently set to country code. Would changing that setting be better to service code?
Thx  ;)
To update old users you must run ipbgeo_update.php from browser, and "service code" will be available later.

"Country code" - physical location
"Service code" - numeric code will be retured in case of request for IP of search bot, proxy or server; and physical location of users in other case

Service-Code:
10-19 - Search bots
20-29 - Hosting, Data centers (colocation and dedicated servers)
30-39 - Proxies, Anonymizers, Tor network
40-49 - Satellite Providers

For example, 91.121.147.207 belongs to WIPmania server. Then:
"Service code" 91.121.147.207 = 20
"Country code" 91.121.147.207 = FR
The country code will be always returned for normal user. Normal users don't surf the web through a proxy or server

For example, 89.59.83.238 is IP address of a normal DSL user from Germany:
"Service code" 89.59.83.238 = DE
"Country code" 89.59.83.238 = DE

Edited by alrond, 16 November 2008 - 08:26 PM.


#4 Fireitup

Fireitup

    Member

  • Banned
  • PipPipPip
  • 41 posts
  • IPB Version:v2.3.x

Posted 17 November 2008 - 04:33 AM

OMG, AWSOME!!! ;)  

Good work mate!

Edited by Fireitup, 17 November 2008 - 04:40 AM.


#5 Subliminal

Subliminal

    Advanced Member

  • Members
  • PipPipPipPip
  • 70 posts
  • IPB Version:v2.3.x

Posted 17 November 2008 - 08:26 PM

Great job!  Took a while to install though xD

I can't wait for the service code to come out.  When can we expect this?

#6 HardcoreRaver

HardcoreRaver

    Coder

  • Banned
  • PipPipPipPipPip
  • 113 posts
  • IPB Version:v2.3.x

Posted 18 November 2008 - 01:55 AM

yoyo, wkd mod ;)

1 think i cant seem to see any flags in the footer of the board but i can see them on posts. What can be wrong i followed the code perfectly and double checked.

#7 Modslair

Modslair

    Novice

  • Members
  • PipPip
  • 8 posts
  • IPB Version:v3.1.x

Posted 18 November 2008 - 04:21 PM

Upalnite, did you run the update script. I had the problem the other way around to you, ran the update, and it sorted it all out.

Great mod this, top marks alrond.

#8 HardcoreRaver

HardcoreRaver

    Coder

  • Banned
  • PipPipPipPipPip
  • 113 posts
  • IPB Version:v2.3.x

Posted 18 November 2008 - 11:48 PM

yh i've run the script and ran the sql tasks, the flags are showing up in the footer next to the members names, but not showing under the last click & member name links.

#9 HardcoreRaver

HardcoreRaver

    Coder

  • Banned
  • PipPipPipPipPip
  • 113 posts
  • IPB Version:v2.3.x

Posted 20 November 2008 - 12:24 AM

Any help with this please alrond?

#10 simplerock

simplerock

    Novice

  • Banned
  • PipPip
  • 17 posts
  • IPB Version:v3.0.x

Posted 20 November 2008 - 02:46 PM

hey, sorry, maybe this is a stupid question but how do I make the 3 SQL requests like in the instruction written?

#11 HardcoreRaver

HardcoreRaver

    Coder

  • Banned
  • PipPipPipPipPip
  • 113 posts
  • IPB Version:v2.3.x

Posted 20 November 2008 - 02:53 PM

Log into admin section, click on admin tab, in there click on sql toolbox, scroll to bottom of here and place the sql commands in here and submit (i did it 1 at a time), or if you have access to phpmyadmin you can run these commands in there

Edited by Upalnite, 20 November 2008 - 02:54 PM.


#12 simplerock

simplerock

    Novice

  • Banned
  • PipPip
  • 17 posts
  • IPB Version:v3.0.x

Posted 20 November 2008 - 04:53 PM

@Upalnite: thanks!

I have this error when running the update script:

Warning: fsockopen() [function.fsockopen]: unable to connect to api.wipmania.com:80 in /.../forum/ipbgeo_update.php on line 213
Connection timed out (110)

tried several times but still the same? any help??

#13 HardcoreRaver

HardcoreRaver

    Coder

  • Banned
  • PipPipPipPipPip
  • 113 posts
  • IPB Version:v2.3.x

Posted 21 November 2008 - 12:33 AM

soz man, we'll have to wait for mod author to see bout that 1

#14 alrond

alrond

    Member

  • Members
  • PipPipPip
  • 20 posts
  • IPB Version:v2.1.x

Posted 26 November 2008 - 11:59 PM

View PostSubliminal, on Nov 17 2008, 09:26 PM, said:

I can't wait for the service code to come out.  When can we expect this?
soon ;) , at this time, Source Code in the test phase

#15 alrond

alrond

    Member

  • Members
  • PipPipPip
  • 20 posts
  • IPB Version:v2.1.x

Posted 27 November 2008 - 12:07 AM

View PostUpalnite, on Nov 19 2008, 12:48 AM, said:

yh i've run the script and ran the sql tasks, the flags are showing up in the footer next to the members names, but not showing under the last click & member name links.
could you check step 13. /sources/action_public/online.php?
PM me your forum, I check you HTML

#16 alrond

alrond

    Member

  • Members
  • PipPipPip
  • 20 posts
  • IPB Version:v2.1.x

Posted 27 November 2008 - 12:10 AM

View Postsimplerock, on Nov 20 2008, 05:53 PM, said:

Warning: fsockopen() [function.fsockopen]: unable to connect to api.wipmania.com:80 in /.../forum/ipbgeo_update.php on line 213
Connection timed out (110)
yould you ping "api.wipmania.com" from your server? may be your hosting provider has bad lines or routing tables.

#17 Makaaveli

Makaaveli

    Post-aholic

  • Members
  • PipPipPipPipPipPipPip
  • 579 posts
  • Real Name:Anthony
  • IPB Version:v3.2.x

Posted 27 November 2008 - 11:11 AM

Arlond, this is one heck of a great mod may i say.

I'm just having one problem though. It doesn't shown the flags under the user online lists. Like in this image - http://static.wipman...t-mem-flags.png the bottom row of flags doesn't show for mine. It just shows a ".", nothing else.

here's my code -

<tr>
			<td class="formsubtitle" colspan="2">{$active['TOTAL']} {$this->ipsclass->lang['active_users']}</td>
		</tr>
<tr><td colspan="2" style="padding: 0;">
<table width="100%" cellspacing="0" cellpadding="0" border="0" style="margin: 0;">
<tr>
<td width="50%" height="3" style="padding: 0; height: 3px !important; background: transparent url(style_images/<#IMG_DIR#>/row-left.gif) no-repeat top left; "></td>
<td width="50%" height="3" style="padding: 0; height: 3px !important; background: transparent url(style_images/<#IMG_DIR#>/row-right.gif) no-repeat top right; "></td>
</tr></table></td>
</tr>
		<tr>
			<td class="row1" width="1%"><{F_ACTIVE}></td>
			<td class="row2">
				<b>{$active['GUESTS']}</b> {$this->ipsclass->lang['guests']}, <b>{$active['MEMBERS']}</b> {$this->ipsclass->lang['public_members']}, <b>{$active['ANON']}</b> {$this->ipsclass->lang['anon_members']}
				<div class="thin">{$active['NAMES']}</div>
				{$active['links']}
{$active['FLAGS']}
			</td>
		</tr>
		<!--IBF.WHOSCHATTING-->

I dont know, maybe i missed an edit?

EDIT: also can you check my online.php.

And whats up with this problem, online users today is right with the flags, but users online list is wrong.... look at the name "zack" -  http://img522.images...8/glitchme0.png

Attached Files


Edited by Makaaveli, 27 November 2008 - 02:34 PM.


#18 DrMac

DrMac

    Advanced Member

  • Banned
  • PipPipPipPip
  • 72 posts
  • Location:Massachusetts, USA
  • Real Name:Dr Macinyasha
  • IPB Version:v2.3.x

Posted 30 November 2008 - 06:28 AM

Alright, just went through the install, and after a while the ipbgeo_update.php turned out this:

Quote

Script for update countries in users profiles and posts. Geomod for Invision Power Board by WIPmania.com.
52992 undefined users and 72959 posts.

Warning: fsockopen() [function.fsockopen]: unable to connect to api.wipmania.com:80 (Connection timed out) in /home/theviper/public_html/ipbgeo_update.php on line 213
Connection timed out (110)

So I'm running it again right now after changing the max runtime for PHP from 30 to 3000 (just for kicks) and told CSF+LFD to ignore the script, and I get the same error message again, and this is how my forums look now:
Posted Image

A little help here?

And I'm pretty sure my firewall isn't blocking anything because I can use Rapidleech to download from YouTube and Rapidshare just fine, and IP.B and all of the mods I have for it can phone home to check for updates.

Edited by DrMac, 30 November 2008 - 01:42 PM.

Posted Image
Posted Image
If I have helped you at all, please download this file as a free user:
http://rapidshare.co...ou.11.21.08.rar

#19 alrond

alrond

    Member

  • Members
  • PipPipPip
  • 20 posts
  • IPB Version:v2.1.x

Posted 30 November 2008 - 10:04 PM

View PostDrMac, on Nov 30 2008, 07:28 AM, said:

Alright, just went through the install, and after a while the ipbgeo_update.php turned out this...
see my answer here

#20 alrond

alrond

    Member

  • Members
  • PipPipPip
  • 20 posts
  • IPB Version:v2.1.x

Posted 30 November 2008 - 11:09 PM

View PostMakaaveli, on Nov 27 2008, 12:11 PM, said:

EDIT: also can you check my online.php.
it must be "/sources/lib/func_boardstats.php"

View PostMakaaveli, on Nov 27 2008, 12:11 PM, said:

And whats up with this problem, online users today is right with the flags, but users online list is wrong.... look at the name "zack" -  http://img522.images...8/glitchme0.png
The flag of "Online members" is always actual (requested for every new session) and the country in section "Members today" is from members profile: network is "alive" and is changed immediately, most likely this old IP range was assigned to the new country. If you send me PM with both IP addresses, I can say more ;)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users