HTTP GET
#1

Hello,

I want create an API who make a forum account when an user register on the server.

My script:

Код:
public RegisterAccount(playerid, mail[], password[])
{
	new
		request[550];

	format(request, sizeof(request), "publickey?=%s&privatekey=%s&username=%s&sampid=%d&email=%s&password_hash=%s", API_PUBLIC_KEY, API_PRIVATE_KEY, GetName(playerid), 0, mail, password);
	HTTP(playerid, HTTP_GET, API_LINK, request, "CreateAccount_HTTP");
	return 1;
}

forward CreateAccount_HTTP(index, response_code, data[]);
public CreateAccount_HTTP(index, response_code, data[])
{
	printf("index: %d | response_code: %d | data[]: %s", index, response_code, data);
}
What is wrong ? It doesn't work...
Reply


Messages In This Thread
HTTP GET - by djoudjou - 08.07.2018, 11:55
Re: HTTP GET - by djoudjou - 08.07.2018, 12:02
Re: HTTP GET - by jlalt - 08.07.2018, 12:34

Forum Jump:


Users browsing this thread: 1 Guest(s)