12.02.2019, 19:32
Olб, eu estava a procura de um Anti-Proxy quando vi esse aqui, sу que ele nгo funciona, nгo manda debug dizendo se estб com Anit-Proxy, se nгo estб em fim... serб que й a include a_http? Se for e alguйm tiver ela atualizada e quiser mandar pra mim, agradeзo.
PHP код:
new ip[16], string[59];
GetPlayerIp(playerid, ip, sizeof ip);
format(string, sizeof string, "http://proxy.mind-media.com/block/proxycheck.php?ip=%s", ip);
HTTP(playerid, HTTP_GET, string, "", "MyHttpResponse");
forward MyHttpResponse(playerid, response_code, data[]);
public MyHttpResponse(playerid, response_code, data[])
{
new name[MAX_PLAYERS],string[256];
new ip[16];
GetPlayerName(playerid, name, sizeof(name));
GetPlayerIp(playerid, ip, sizeof ip);
if(strcmp(ip, "127.0.0.1", true) == 0)
{
format(string, 256, "[LOCALHOST] %s(%d) has joined the server.", name, playerid);
SendClientMessageToAll( 0x09F7DFC8, string);
return 1;
}
if(response_code == 200)
{
if(data[0] == 'Y')
{
SendClientMessage(playerid, COLOR_LIGHTRED, "[ANTI-PROXY]: Proxy Detectado, desligue seu Proxy/VPN senao ira ser kickado !");
format(string, sizeof(string), "[ANTI-PROXY] Player %s foi kickado por suspeita de Proxy/VPN", pName[playerid]);
ABroadCast(COLOR_LIGHTRED, string, 1);
printf("Proxy Detectado !");
SetTimerEx("DelayedKick", 100, false, "i", playerid);
}
if(data[0] == 'N')
{
printf("Proxy nao detectado !");
}
if(data[0] == 'X')
{
printf("WRONG IP FORMAT");
}
else
{
printf("The request failed! The response code was: %d", response_code);
}
}
return 1;
}
forward DelayedKick(playerid);
DelayedKick(playerid)
{
Kick(playerid);
return 1;
}