Modules/cURL/curl escape

From Multi Theft Auto: Wiki
Revision as of 11:10, 22 June 2014 by DutchCaffeine (talk | contribs)
(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.

Escape url's. You wont need this function if you pass the url to curl_init.

Syntax

curlEscape(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 = curlInit();
if not curl then
    outputDebugString("Can't connect to http://mtasa.com/ with cURL");
else
    curlSetopt(curl, CURLOPT_URL, curlEscape(curl, "http://mtasa.com/"));
    curlClose(curl);
end


See also