Modules/cURL/curl escape

From Multi Theft Auto: Wiki
Revision as of 18:41, 31 January 2011 by Alexander (talk | contribs) (Created page with "__NOTOC__ {{ModuleFunction|cURL}} Closes the curl engine. ==Syntax== <syntaxhighlight lang="lua"> curl_escape(curl handler, string url) </syntaxhighlight> ==Required arguments== * '''curl''' The curl ha...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


Package-x-generic.png This function is provided by the external module cURL. You must install this module to use this function.

Closes the curl engine.

Syntax

curl_escape(curl handler, string url)

Required arguments

  • curl The curl handler
  • url The url you want to escape

Returns

The escaped url, if it fails it will return nil

Example

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


See also