[Plugin] GeoIP Plugin v0.1.4 (Country detector) - 04/05/2008
#61

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
Reply
#62

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
Reply
#63

Chance is, that country is not in the database.
Reply
#64

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;
}
Reply
#65

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 ).
Reply
#66

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.
Reply
#67

Anyone have this Plugin for Linux?
Reply
#68

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.
Reply
#69

Thank you.
Reply
#70

No links?
Reply
#71

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

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;
}
Reply
#73

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
Reply
#74

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!
Reply
#75

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

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
Reply
#77

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.
Reply
#78

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...
Reply
#79

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

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..
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)