Modules/cURL/curl init: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Created page with '__NOTOC__ {{ModuleFunction|cURL}} Initialize the curl engine. ==Syntax== <syntaxhighlight lang="lua"> curl curl_init(string url) </syntaxhighlight> ==Required arguments== * '''url''' The url which you w…')
 
No edit summary
 
(8 intermediate revisions by 4 users not shown)
Line 1: Line 1:
__NOTOC__
{{Modules/cURL/func_page|
{{ModuleFunction|cURL}}
description = Initialize the curl engine.|
Initialize the curl engine.
syntax = <syntaxhighlight lang="lua">curl curlInit([string url])</syntaxhighlight>|
 
required_arguments      = *There are no required arguments.|
==Syntax==
optional_arguments = * '''url''' The url which you want to connect too.|
<syntaxhighlight lang="lua">
returns = A valid curl handler on succes, otherwise it returns false|
curl curl_init(string url)
example = <syntaxhighlight lang="lua">
</syntaxhighlight>
curl = curlInit("http://mtasa.com/");
 
==Required arguments==
* '''url''' The url which you want to connect too.
 
==Returns==
A valid curl handler on succes, otherwise it returns false
 
==Example==
<syntaxhighlight lang="lua">
curl = curl_init("http://mtasa.com/");
if not curl then
if not curl then
     outputDebugString("Can't connect to http://mtasa.com/ with cURL");
     outputDebugString("Can't connect to http://mtasa.com/ with cURL");
else
else
     // lets do something here.
     -- lets do something here.
end
end
</syntaxhighlight>
</syntaxhighlight>
 
}}
 
==See also==
{{Modules/cURL/functions}}

Latest revision as of 11:06, 22 June 2014


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

Initialize the curl engine.

Syntax

curl curlInit([string url])

Required arguments

  • There are no required arguments.

Optional arguments

  • url The url which you want to connect too.

Returns

A valid curl handler on succes, otherwise it returns false

Example

curl = curlInit("http://mtasa.com/");
if not curl then
    outputDebugString("Can't connect to http://mtasa.com/ with cURL");
else
    -- lets do something here.
end

See also