SA-MP Forums Archive
[Plugin] GeoIP Plugin v0.1.4 (Country detector) - 04/05/2008 - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Plugin Development (https://sampforum.blast.hk/forumdisplay.php?fid=18)
+--- Thread: [Plugin] GeoIP Plugin v0.1.4 (Country detector) - 04/05/2008 (/showthread.php?tid=32509)

Pages: 1 2 3 4 5


Re: GeoIP Plugin v0.1.4 (Country detector) - 04/05/2008 - SlashPT - 23.09.2010

Quote:
Originally Posted by Remis
Посмотреть сообщение
Why? It works and it doesn't manipulate the memory, so you do not have to update any addresses.


Add GeoIP instead of GeoIP.so in the config.
OR rename in the plugins folder "GeoIP" to "GeoIP.so"
(usually it is GeoIP.so, but the creator took "GeoIP" without .so as name)



Moreover I recompiled this plugin with a newer version if GeoIP (1.4.6)
http://www.jeffersongta.de/downloads/GeoIP-plugin.zip (too big for attachments)
Changelog : http://pastebin.com/67wkhVzp
But there are not any new functions. Just some fixes and more timezones and countries.

It also contains the update GeoIP.dat. Worked without any problems on linux/gnu and windows for me.


Edit: Iam thinking about adding "GeoIP_range_by_ip" : returns the start and end IP address for the range containing the IP address. Maybe I update this plugin again with this function.
Yea sorry man... my mistake i didnt puted the GeoIP_City because i thought it would be and it didnt started the plugin xD

I changed the plugin for not load that file as i just want the GetPlayerCountry...

and its working so good work there


Re: GeoIP Plugin v0.1.4 (Country detector) - 04/05/2008 - MarkoniGHS - 27.09.2010

Can someone help me

I want to make it at the beginning when the player connects
If player is from specific state
to be kicked or something

public OnPlayerConnect(playerid, reason)
{
new countryname[64];
GetPlayerCountryName(playerid, countryname, sizeof(countryname));
if(!strcmp(countryname, "Albania", true))
{
Kick(playerid);
SendClientMessage(playerid, 0xFFCFCFAA, "not allowed for players from Albania");
return 1;
}

return 1;
}
something like this
but this does not work


Re: GeoIP Plugin v0.1.4 (Country detector) - 04/05/2008 - CJ101 - 28.09.2010

Chance is, that country is not in the database.


Re: GeoIP Plugin v0.1.4 (Country detector) - 04/05/2008 - false - 30.09.2010

I use it ...

Код:
#include <a_samp>
#include <a_http>

public OnPlayerConnect(playerid)
{
	new IP[16],string[256];
        GetPlayerIp(playerid, IP, sizeof(IP));
	format(string,sizeof(string),"api.wipmania.com/%s",IP);
	HTTP(playerid, HTTP_GET ,string, "", "MyHttpResponse");
        return 1;
}

forward MyHttpResponse(index, response_code, data[]);
public MyHttpResponse(index, response_code, data[])
{
        if(response_code == 403 || response_code == 404 || response_code == 500)
        {
              new pname[MAX_PLAYER_NAME], string[256];
              GetPlayerName(index, pname, sizeof(pname));
	      format(string,sizeof(string),"%s connected",pname);
	      SendClientMessageToAll(0xffffffff,string);
        }
        else
        {
              new pname[MAX_PLAYER_NAME], string[256];
              GetPlayerName(index, pname, sizeof(pname));
	      format(string,sizeof(string),"%s connected [country: %s]",pname,data);
	      SendClientMessageToAll(0xffffffff,string);
        }
	return 1;
}



Re: GeoIP Plugin v0.1.4 (Country detector) - 04/05/2008 - kurta999 - 30.09.2010

Quote:
Originally Posted by false
Посмотреть сообщение
I use it ...

Код:
#include <a_samp>
#include <a_http>

public OnPlayerConnect(playerid)
{
	new IP[16],string[256];
        GetPlayerIp(playerid, IP, sizeof(IP));
	format(string,sizeof(string),"api.wipmania.com/%s",IP);
	HTTP(playerid, HTTP_GET ,string, "", "MyHttpResponse");
        return 1;
}

forward MyHttpResponse(index, response_code, data[]);
public MyHttpResponse(index, response_code, data[])
{
        new pname[MAX_PLAYER_NAME], string[256];
        GetPlayerName(index, pname, sizeof(pname));
	format(string,sizeof(string),"%s connected [country: %s]",pname,data);
	SendClientMessageToAll(0xffffffff,string);
	return 1;
}
Very nice , but the HTTP client is slow
--------------------------------------------

The new recomplied geoip plugin working, but crashing, i tested on my server ( Linux ).


Re: GeoIP Plugin v0.1.4 (Country detector) - 04/05/2008 - kurta999 - 04.07.2011

Quote:
Originally Posted by Remis
Посмотреть сообщение
Why? It works and it doesn't manipulate the memory, so you do not have to update any addresses.


Add GeoIP instead of GeoIP.so in the config.
OR rename in the plugins folder "GeoIP" to "GeoIP.so"
(usually it is GeoIP.so, but the creator took "GeoIP" without .so as name)



Moreover I recompiled this plugin with a newer version if GeoIP (1.4.6)
http://www.jeffersongta.de/downloads/GeoIP-plugin.zip (too big for attachments)
Changelog : http://pastebin.com/67wkhVzp
But there are not any new functions. Just some fixes and more timezones and countries.

It also contains the update GeoIP.dat. Worked without any problems on linux/gnu and windows for me.


Edit: Iam thinking about adding "GeoIP_range_by_ip" : returns the start and end IP address for the range containing the IP address. Maybe I update this plugin again with this function.
Try this.
But here this link upper in this page, it must works.


Re: GeoIP Plugin v0.1.4 (Country detector) - 04/05/2008 - [MM]18240[FMB] - 05.02.2013

Anyone have this Plugin for Linux?


Re: GeoIP Plugin v0.1.4 (Country detector) - 04/05/2008 - karolis1478 - 10.02.2013

Quote:
Originally Posted by [MM]18240[FMB]
View Post
Anyone have this Plugin for Linux?
in the package is GeoIP_Plugin.dll and GeoIP_Plugin (no .so or .dll) just copy in plugins directory and thats all.


Re: GeoIP Plugin v0.1.4 (Country detector) - 04/05/2008 - Dezerian - 01.08.2013

Thank you.


Re: GeoIP Plugin v0.1.4 (Country detector) - 04/05/2008 - Dezerian - 01.08.2013

No links?


Re: GeoIP Plugin v0.1.4 (Country detector) - 04/05/2008 - Donvalley - 05.08.2013

so how would i use this so that OnPlayerConnect the players country goes into a log?


Re: GeoIP Plugin v0.1.4 (Country detector) - 04/05/2008 - QuaTTrO - 05.08.2013

Quote:
Originally Posted by Donvalley
Посмотреть сообщение
so how would i use this so that OnPlayerConnect the players country goes into a log?
pawn Код:
public OnPlayerConnect(playerid)
{
    new name[MAX_PLAYER_NAME], country[MAX_COUNTRY_NAME], gmt;

    GetPlayerName(playerid, name, sizeof(name));
    country = GetPlayerCountryName(playerid);
    gmt = GetPlayerGMT(playerid);

    printf("[JOIN] %s (%s, GMT %d:00)", name, country, gmt);
    return 1;
}



Re: GeoIP Plugin v0.1.4 (Country detector) - 04/05/2008 - Donvalley - 05.08.2013

Quote:
Originally Posted by QuaTTrO
Посмотреть сообщение
pawn Код:
public OnPlayerConnect(playerid)
{
    new name[MAX_PLAYER_NAME], country[MAX_COUNTRY_NAME], gmt;

    GetPlayerName(playerid, name, sizeof(name));
        country = GetPlayerCountryName(playerid);
    gmt = GetPlayerGMT(playerid);

    printf("[JOIN] %s (%s, GMT %d:00)", name, country, gmt);
    return 1;
}
Cheers, btw nice sig i just tried to swat it off my screen lol


Re: GeoIP Plugin v0.1.4 (Country detector) - 04/05/2008 - [MM]18240[FMB] - 22.06.2014

Found a link by googling the archive name!

http://www.purple.dti.ne.jp/totto/fi...ugin-0.1.4.zip

Not hosted by me!


Re: GeoIP Plugin v0.1.4 (Country detector) - 04/05/2008 - Private200 - 22.06.2014

Congratulations! You just bumped a year old thread! What are you trying to say with that though?


Re: GeoIP Plugin v0.1.4 (Country detector) - 04/05/2008 - LeaveMe - 22.06.2014

Quote:
Originally Posted by [MM]18240[FMB]
Посмотреть сообщение
Found a link by googling the archive name!

http://www.purple.dti.ne.jp/totto/fi...ugin-0.1.4.zip

Not hosted by me!
Thanks,
New mirror
http://www.mirrorupload.net/file/J55...ugin-0.1.4.zip


Re: GeoIP Plugin v0.1.4 (Country detector) - 04/05/2008 - [WSF]ThA_Devil - 24.06.2014

I HIGHLY SUGGEST NOT USING THIS PLUGIN.
Reasons:
1. Outdated
2. Slow
3. There are more lightweight alternatives for this plugin (Example: Click Me)
4. I do not remember it having linux version.


AW: GeoIP Plugin v0.1.4 (Country detector) - 04/05/2008 - uZ1 - 25.06.2014

1. Yes.
2. It's not.
3. Yes but the databases of them are not so easy to update like this.
4. It has.

And a bonus number 5. I still don't understand why no one is going to update this plugin? There is the source, there are great coders and still nothing...


Re: GeoIP Plugin v0.1.4 (Country detector) - 04/05/2008 - kurta999 - 25.06.2014

I'm using this plugin since 2009 and I will use it, no problems at all. I hate threaded HTTP solutions.


Re: GeoIP Plugin v0.1.4 (Country detector) - 04/05/2008 - [MM]18240[FMB] - 27.06.2014

Quote:
Originally Posted by Private200
Посмотреть сообщение
Congratulations! You just bumped a year old thread! What are you trying to say with that though?
Yes, I bumped the thread; but I provided something that people were looking for and i'm sure has caused great confusion so.. yeah..