Modules/cURL/curl setopt

From Multi Theft Auto: Wiki
Revision as of 20:20, 13 June 2010 by Mrdejong (talk | contribs) (Created page with '__NOTOC__ {{ModuleFunction|cURL}} Set an curl option. ==Syntax== <syntaxhighlight lang="lua"> curlcode curl_setopt(curl handler, curloption option, bool/number/string value) </syntaxhighlight> ==Require…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


This function is provided by the external module cURL. You must install this module to use this function.

Set an curl option.

Syntax

curlcode curl_setopt(curl handler, curloption option, bool/number/string value)

Required arguments

  • handler The curl handler.
  • option An curl option, al the options are found here
  • value The value, this can be a string, number or boolean. At the curl option list you can find wich option needs a string, number or boolean.

Returns

Returns a curlcode. Nevermind it for now, i even don't know what it is. But it returns it.

Example

curl = curl_init("http://mtasa.com/");
if not curl then
    outputDebugString("Can't connect to http://mtasa.com/ with cURL");
else
    curl_setopt(curl, CURLOPT_POST, true);
    curl_close(curl);
end


See also