hello. I'm trying to make an autoupdater for a plugin with curl, but i don t get how to use it. I was looking up on Bugsy's vacbans when i realized that i don't understand a single thing of that curl.
that is the code i was trying to make
PHP Code:
#include <amxmodx>
#include <curl>
#define CURL_BUFFERSIZE 4096
public plugin_init()
{
register_plugin("CURL Test", "1.0", "-");
}
public curl_test()
{
new szCURL_url[128]
new szLatestVersion[4]
new CURL:cURLHandle
new const szCurlErrorBuffer[CURL_BUFFERSIZE]
formatex(szCURL_url, charsmax(szCURL_url), "https://lexzor.warface.ro/AutoUpdate/Test/version.txt")
cURLHandle = curl_easy_init()
if(cURLHandle)
{
curl_easy_setopt(cURLHandle, CURLOPT_URL, szCURL_url)
curl_easy_setopt(cURLHandle, CURLOPT_CAINFO, szLatestVersion )
}
}
i didn't find any info about const CURLOPT_CAINFO in .inc file so i don t know how to use it.
First of all, i tried to read a site:
https://lexzor.warface.ro/AutoUpdate/Test/version.txt
From links like this i would like to read latest versions of my plugins.
Can i get some help with this ?