PHP Code:
new JSON:jsontest
new CURL:test
PHP Code:
jsontest = json_create();
json_set_string(jsontest, "content", [[string]])
static szEncoded[4096];
json_encode( jsontest, szEncoded, charsmax( szEncoded ) );
test = curl_easy_init()
curl_easy_setopt(test, CURLOPT_URL, "https://discordapp.com/api/webhooks/[redacted]");
curl_easy_setopt(test, CURLOPT_POST, 1);
curl_easy_setopt(test, CURLOPT_HEADER, "Content-Type: application/json");
curl_easy_setopt(test, CURLOPT_POSTFIELDS, szEncoded);
log_amx("Enviando: %s", szEncoded)
curl_easy_perform(test, "completeCallback")
I'm using
Exolent's JSON include.
__________________