How i get this API data into my script
#1


How i can get that code into my script?

PHP код:
public OnLookupResponse(sessionidresponsedata[])
{
    new 
xml[5][2],
    
playerid GetPlayerFromSession(sessionid);
    if(
playerid == -1) return 1;
    if(
response != 200)
    {
    if(
Retry[playerid] == 0)
    {
    
Retry[playerid] = 1;
    
LookupPlayerIP(playerid);
    }
    return 
1;
    }
    
xml[0][0] = strfind(data,     "<host>"true);
    
xml[0][1] = strfind(data,    "</host>"true);
    
xml[1][0] = strfind(data,      "<isp>"true);
    
xml[1][1] = strfind(data,     "</isp>"true);
    
xml[2][0] = strfind(data,     "<code>"true);
    
xml[2][1] = strfind(data,    "</code>"true);
    
xml[3][0] = strfind(data,  "<country>"true);
    
xml[3][1] = strfind(data"</country>"true);
    
xml[4][0] = strfind(data,   "<region>"true);
    
xml[4][1] = strfind(data,  "</region>"true);
    
strmidex(LookupData[playerid][Hostname], data,  xml[0][0], xml[0][1], 60);
    
strmidex(LookupData[playerid][ISP],      data,  xml[1][0], xml[1][1], 60);
    
strmidex(LookupData[playerid][Code],     data,  xml[2][0], xml[2][1],  3);
    
strmidex(LookupData[playerid][Country],  data,  xml[3][0], xml[3][1], 40);
    
strmidex(LookupData[playerid][Region],   data,  xml[4][0], xml[4][1], 40);
    
LookupData[playerid][Proxy] = strval(data[strfind(data"<proxy>"true) + 7]);
    
CallLocalFunction("OnLookupComplete""i"playerid);
    return 
1;

Reply


Messages In This Thread
How i get this API data into my script - by MasterCodez - 24.10.2017, 03:37
Re: How i get this API data into my script - by oMa37 - 24.10.2017, 04:39
Re: How i get this API data into my script - by jlalt - 24.10.2017, 04:53
Re: How i get this API data into my script - by MasterCodez - 24.10.2017, 12:48
Re: How i get this API data into my script - by MasterCodez - 24.10.2017, 13:36
Re: How i get this API data into my script - by jlalt - 24.10.2017, 14:04
Re: How i get this API data into my script - by MasterCodez - 24.10.2017, 14:10
Re: How i get this API data into my script - by BroZeus - 24.10.2017, 14:13
Re: How i get this API data into my script - by MasterCodez - 24.10.2017, 14:26

Forum Jump:


Users browsing this thread: 1 Guest(s)