Иконка ресурса

addons AmxxCurl 1.1.1

Нет прав для скачивания
Установка
  1. Для Linux скопируйте модуль curl_amxx_i386.so из архива amxx_curl_linux_v1.1.1.zip в директорию: amxmodx/scripting/modules/
    Для Windows скопируйте модуль curl_amxx.dll из архива amxx_curl_windows_v1.1.1.zip в директорию: amxmodx/scripting/modules/
  2. Скопируйте .inc файлы curl.inc и curl_consts.inc из архива amxx_includes.zip в директорию: amxmodx/scripting/include
API
C++:
/**
* URL encodes a string
*
* @param handle            CURL Handle.
* @param url            URL string.
* @param escapedUrl        output string for escaped URL.
* @param len            length of output string.
*
* @return                 length of escapedUrl string.
*/
native curl_easy_escape(const CURL:handle, const url[], escapedUrl[], const len)

/**
* URL decodes a string
*
* @param handle            CURL Handle.
* @param url            URL string.
* @param unescapedUrl    output string for unescaped URL.
* @param len            length of output string.
*
* @return                length of unescaped string.
*/
native curl_easy_unescape(const CURL:handle, const url[], unescapedUrl[], const len)

/**
* Create a CURL Handle.
*
* @return                 CURL Handle.
*/
native CURL:curl_easy_init()

/**
* Perform a blocking file transfer
*
* @param handle                CURL Handle.
* @param callbackComplite    file transfer callback.
* @param data                string with additional parameters for callback.
* @param data_len            length of string with additional parameters.
*/
native void:curl_easy_perform(const CURL:handle, const callbackComplite[], const data[] = {}, const data_len = 0)

/**
* Set options for a curl easy handle
*
* @param handle                CURL Handle.
* @param callbackComplite    option for CURL Handle.
*
* @return                     CURLcode error code.
*/
native CURLcode:curl_easy_setopt(const CURL:handle, const CURLoption:option, any:...)

/**
* End a libcurl easy handle
*
* @param handle                CURL Handle.
*/
native void:curl_easy_cleanup(const CURL:handle)

/**
* End a libcurl easy handle
*
* @param handle                CURL Handle.
*/
native void:curl_easy_reset(const CURL:handle)

/**
* Extract information from a curl handle
*
* @param handle                CURL Handle.
* @param info                CURLINFO Handle.
*
* @return                     CURLcode error code.
*/
native CURLcode:curl_easy_getinfo(const CURL:handle, const CURLINFO:info, any:...)

/**
* Extract detaild information from a CURLcode error code.
*
* @param code                CURLcode error code.
* @param errorBuf            output string with information.
* @param len                len of output string.
*/
native void:curl_easy_strerror(const CURLcode:code, errorBuf[], const len)

/**
* Add a string to an slist
*
* @param list                linked list of strings.
* @param buffer                appending string.
*
* @return                     curl_slist linked list of strings.
*/
native curl_slist:curl_slist_append(curl_slist:list, buffer[])

/**
* Free an entire curl_slist list
*
* @param list                linked list of strings.
*/
native void:curl_slist_free_all(curl_slist:list)

/**
* Returns version of CURL
*
* @param buf            output string with information.
* @param len            len of output string.
*/
native void:curl_version(buf[], len)
Сверху Снизу