Raised This Month: $ Target: $400
 0% 

CURL Help


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
lexzor
Veteran Member
Join Date: Nov 2020
Old 05-11-2021 , 11:00   CURL Help
Reply With Quote #1

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_urlcharsmax(szCURL_url), "https://lexzor.warface.ro/AutoUpdate/Test/version.txt")

    
cURLHandle curl_easy_init()

    if(
cURLHandle)
    {
        
curl_easy_setopt(cURLHandleCURLOPT_URLszCURL_url)
        
curl_easy_setopt(cURLHandleCURLOPT_CAINFOszLatestVersion )
    }

    

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 ?

Last edited by lexzor; 05-11-2021 at 11:21.
lexzor is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:29.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode