If you are looking for an actual and maintained module to work with HTTP and FTP, you can use https://github.com/Next21Team/AmxxEasyHttp.
AmxxCurl module is a wrapper over libcurl (with ssl support) easy interface for amxmodx. Module performs curl's in non-blocking mode.
Download latest version here.
- ✔️ Improving performance: using asio, curl multi interface and c-areas.
- ✔️ Adding simple interfaces for most common cases. (it was decided to make a separate module with a simple api, see AmxxEasyHttp)
You must have installed the latest version premake5. (Get it here)
Generate Visual Studio project:
premake5 vs2017
You may try generate project for another Visual Studio version.
Open solution and compile it)
Generate Makefile:
premake5 gmake
And compile it:
cd build/gmake
make
All natives functions you can find in curl.inc, they have the same behaviour that C functions.
Except for some:
native void:curl_easy_perform(const CURL:handle, const callbackComplite[], const data[] = {}, const data_len = 0)
The function starts curl perform, and upon completion of the transfer will be call callback callbackComplite. In third parameter you can specify an array of user data, wich will be transferred to callbackComplite, and fourth parameter is array length.
If user data set, callback should have the signature:
public compliteCallback(CURL:curl, CURLcode:code, data[])
else:
public compliteCallback(CURL:curl, CURLcode:code)
native CURLcode:curl_easy_getinfo(const CURL:handle, const CURLINFO:info, any:...)
For string type of CURLINFO option, you must set fourth argument - string size:
new url[64]
curl_easy_getinfo(curl,CURLINFO_EFFECTIVE_URL, url, charsmax(url))
If this description contains a strange phrases, please do a fix commit)